mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpilib] Add TimedRobot unit tests (#2771)
To make the tests reliable, the synchronization in simulation Notifiers had to be reworked. StepTiming() now waits for all Notifiers to reach HAL_WaitForNotifierAlarm(), then steps the time, then lets any expired Notifiers run. While there, we made some variable names more descriptive and added more comments.
This commit is contained in:
@@ -92,6 +92,7 @@ void HALSIM_ResumeTiming(void) {
|
||||
HAL_Bool HALSIM_IsTimingPaused(void) { return IsTimingPaused(); }
|
||||
|
||||
void HALSIM_StepTiming(uint64_t delta) {
|
||||
WaitNotifiers();
|
||||
StepTiming(delta);
|
||||
WakeupWaitNotifiers();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user