mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Add SimulationInit and SimulationPeriodic functions (#2377)
Fixes #2375
This commit is contained in:
@@ -61,6 +61,16 @@ class IterativeRobotBase : public RobotBase {
|
||||
*/
|
||||
virtual void RobotInit();
|
||||
|
||||
/**
|
||||
* Robot-wide simulation initialization code should go here.
|
||||
*
|
||||
* Users should override this method for default Robot-wide simulation
|
||||
* related initialization which will be called when the robot is first
|
||||
* started. It will be called exactly one time after RobotInit is called
|
||||
* only when the robot is in simulation.
|
||||
*/
|
||||
virtual void SimulationInit();
|
||||
|
||||
/**
|
||||
* Initialization code for disabled mode should go here.
|
||||
*
|
||||
@@ -102,6 +112,13 @@ class IterativeRobotBase : public RobotBase {
|
||||
*/
|
||||
virtual void RobotPeriodic();
|
||||
|
||||
/**
|
||||
* Periodic simulation code should go here.
|
||||
*
|
||||
* This function is called in a simulated robot after user code executes.
|
||||
*/
|
||||
virtual void SimulationPeriodic();
|
||||
|
||||
/**
|
||||
* Periodic code for disabled mode should go here.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user