Add RobotPeriodic functions to default templates. (#1149)

This commit is contained in:
Thad House
2018-06-10 20:16:54 -07:00
committed by Peter Johnson
parent 5af85dd1bb
commit c7e97f45f5
9 changed files with 69 additions and 0 deletions

View File

@@ -19,6 +19,16 @@ void Robot::RobotInit() {
frc::SmartDashboard::PutData("Auto Modes", &m_chooser);
}
/**
* This function is called every robot packet, no matter the mode. Use
* this for items like diagnostics that you want ran during disabled,
* autonomous, teleoperated and test.
*
* <p> This runs after the mode specific periodic functions, but before
* LiveWindow and SmartDashboard integrated updating.
*/
void Robot::RobotPeriodic() {}
/**
* This function is called once each time the robot enters Disabled mode. You
* can use it to reset any subsystem information you want to clear when the

View File

@@ -22,6 +22,7 @@ class Robot : public frc::TimedRobot {
static OI m_oi;
void RobotInit() override;
void RobotPeriodic() override;
void DisabledInit() override;
void DisabledPeriodic() override;
void AutonomousInit() override;