mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpilib] Fix SmartDashboard update order (#2896)
We need to execute listener tasks first, then execute value updates. Otherwise local changes can fight with dashboard-made changes.
This commit is contained in:
@@ -528,10 +528,10 @@ public final class SmartDashboard {
|
||||
* Puts all sendable data to the dashboard.
|
||||
*/
|
||||
public static synchronized void updateValues() {
|
||||
// Execute posted listener tasks
|
||||
listenerExecutor.runListenerTasks();
|
||||
for (Sendable data : tablesToData.values()) {
|
||||
SendableRegistry.update(data);
|
||||
}
|
||||
// Execute posted listener tasks
|
||||
listenerExecutor.runListenerTasks();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user