[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

@@ -171,7 +171,9 @@ void IterativeRobotBase::LoopFunc() {
m_watchdog.AddEpoch("Shuffleboard::Update()");
if constexpr (IsSimulation()) {
HAL_SimPeriodicBefore();
SimulationPeriodic();
HAL_SimPeriodicAfter();
m_watchdog.AddEpoch("SimulationPeriodic()");
}