Class Robot


public class Robot
extends TimedRobot
The VM is configured to automatically run this class, and to call the functions corresponding to each mode, as described in the TimedRobot documentation. If you change the name of this class or the package after creating this project, you must also update the build.gradle file in the project.
  • Field Details

  • Constructor Details

  • Method Details

    • robotInit

      public void robotInit()
      This function is run when the robot is first started up and should be used for any initialization code.
      Overrides:
      robotInit in class IterativeRobotBase
    • robotPeriodic

      public void robotPeriodic()
      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.

      This runs after the mode specific periodic functions, but before LiveWindow and SmartDashboard integrated updating.

      Overrides:
      robotPeriodic in class IterativeRobotBase
    • disabledInit

      public void disabledInit()
      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.
      Overrides:
      disabledInit in class IterativeRobotBase
    • disabledPeriodic

      public void disabledPeriodic() throws java.lang.Exception
      Description copied from class: IterativeRobotBase
      Periodic code for disabled mode should go here.
      Overrides:
      disabledPeriodic in class IterativeRobotBase
      Throws:
      java.lang.Exception
    • teleopInit

      public void teleopInit()
      Description copied from class: IterativeRobotBase
      Initialization code for teleop mode should go here.

      Users should override this method for initialization code which will be called each time the robot enters teleop mode.

      Overrides:
      teleopInit in class IterativeRobotBase
    • teleopPeriodic

      public void teleopPeriodic() throws java.lang.Exception
      This function is called periodically during operator control.
      Overrides:
      teleopPeriodic in class IterativeRobotBase
      Throws:
      java.lang.Exception
    • testPeriodic

      public void testPeriodic()
      This function is called periodically during test mode.
      Overrides:
      testPeriodic in class IterativeRobotBase