diff --git a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/resources/templates/command-based/Robot.cpp b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/resources/templates/command-based/Robot.cpp index 9fdbad39aa..04cfc17f3a 100644 --- a/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/resources/templates/command-based/Robot.cpp +++ b/eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/resources/templates/command-based/Robot.cpp @@ -16,6 +16,15 @@ private: lw = LiveWindow::GetInstance(); } + /** + * 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 robot is disabled. + */ + void DisabledInit() + { + } + void DisabledPeriodic() { Scheduler::GetInstance()->Run(); diff --git a/eclipse-plugins/edu.wpi.first.wpilib.plugins.java/resources/templates/command-based/Robot.java b/eclipse-plugins/edu.wpi.first.wpilib.plugins.java/resources/templates/command-based/Robot.java index 28fe393c54..6073cf4d5d 100644 --- a/eclipse-plugins/edu.wpi.first.wpilib.plugins.java/resources/templates/command-based/Robot.java +++ b/eclipse-plugins/edu.wpi.first.wpilib.plugins.java/resources/templates/command-based/Robot.java @@ -30,6 +30,15 @@ public class Robot extends IterativeRobot { oi = new OI(); // instantiate the command used for the autonomous period autonomousCommand = new ExampleCommand(); + } + + /** + * 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 robot is disabled. + */ + public void disabledInit(){ + } public void disabledPeriodic() { @@ -56,14 +65,6 @@ public class Robot extends IterativeRobot { if (autonomousCommand != null) autonomousCommand.cancel(); } - /** - * This function is called when the disabled button is hit. - * You can use it to reset subsystems before shutting down. - */ - public void disabledInit(){ - - } - /** * This function is called periodically during operator control */