[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:
Peter Johnson
2020-11-30 19:24:12 -08:00
committed by GitHub
parent 5427b32a40
commit d16f05f2c8
2 changed files with 4 additions and 4 deletions

View File

@@ -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();
}
}