mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[templates] Add SimulationInit()/SimulationPeriodic() to robot templates (#3943)
This commit is contained in:
@@ -65,6 +65,16 @@ void Robot::TeleopPeriodic() {}
|
||||
*/
|
||||
void Robot::TestPeriodic() {}
|
||||
|
||||
/**
|
||||
* This function is called once when the robot is first started up.
|
||||
*/
|
||||
void Robot::SimulationInit() {}
|
||||
|
||||
/**
|
||||
* This function is called periodically whilst in simulation.
|
||||
*/
|
||||
void Robot::SimulationPeriodic() {}
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() {
|
||||
return frc::StartRobot<Robot>();
|
||||
|
||||
@@ -20,6 +20,8 @@ class Robot : public frc::TimedRobot {
|
||||
void TeleopInit() override;
|
||||
void TeleopPeriodic() override;
|
||||
void TestPeriodic() override;
|
||||
void SimulationInit() override;
|
||||
void SimulationPeriodic() override;
|
||||
|
||||
private:
|
||||
// Have it null by default so that if testing teleop it
|
||||
|
||||
Reference in New Issue
Block a user