[sim] Add HAL hooks for simulationPeriodic (#2881)

This allows vendor libs to hook into the begin or end of simulationPeriodic().
This commit is contained in:
Peter Johnson
2020-11-30 23:55:36 -08:00
committed by GitHub
parent d16f05f2c8
commit 339d7445b3
10 changed files with 195 additions and 0 deletions

View File

@@ -292,7 +292,9 @@ public abstract class IterativeRobotBase extends RobotBase {
m_watchdog.addEpoch("Shuffleboard.update()");
if (isSimulation()) {
HAL.simPeriodicBefore();
simulationPeriodic();
HAL.simPeriodicAfter();
m_watchdog.addEpoch("simulationPeriodic()");
}