Package frc.robot
Class Robot
- All Implemented Interfaces:
AutoCloseable
The methods in this class are called automatically 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 Main.java file in the project.
-
Field Summary
Fields inherited from class edu.wpi.first.wpilibj.TimedRobot
kDefaultPeriod
-
Constructor Summary
ConstructorDescriptionRobot()
This function is run when the robot is first started up and should be used for any initialization code. -
Method Summary
Modifier and TypeMethodDescriptionvoid
This autonomous runs the autonomous command selected by yourRobotContainer
class.void
This function is called periodically during autonomous.void
This function is called once each time the robot enters Disabled mode.void
void
This function is called every 20 ms, no matter the mode.void
This function is called once when the robot is first started up.void
This function is called periodically whilst in simulation.void
void
This function is called periodically during operator control.void
testInit()
void
This function is called periodically during test mode.Methods inherited from class edu.wpi.first.wpilibj.TimedRobot
addPeriodic, addPeriodic, addPeriodic, addPeriodic, close, endCompetition, getLoopStartTime, startCompetition
Methods inherited from class edu.wpi.first.wpilibj.IterativeRobotBase
autonomousExit, disabledExit, driverStationConnected, enableLiveWindowInTest, getPeriod, isLiveWindowEnabledInTest, loopFunc, printWatchdogEpochs, robotInit, setNetworkTablesFlushEnabled, teleopExit, testExit
Methods inherited from class edu.wpi.first.wpilibj.RobotBase
getMainThreadId, getRuntimeType, isAutonomous, isAutonomousEnabled, isDisabled, isEnabled, isReal, isSimulation, isTeleop, isTeleopEnabled, isTest, isTestEnabled, startRobot, suppressExitWarning
-
Constructor Details
-
Robot
public Robot()This function is run when the robot is first started up and should be used for any initialization code.
-
-
Method Details
-
robotPeriodic
public void robotPeriodic()This function is called every 20 ms, 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 classIterativeRobotBase
-
disabledInit
public void disabledInit()This function is called once each time the robot enters Disabled mode.- Overrides:
disabledInit
in classIterativeRobotBase
-
disabledPeriodic
public void disabledPeriodic()- Overrides:
disabledPeriodic
in classIterativeRobotBase
-
autonomousInit
public void autonomousInit()This autonomous runs the autonomous command selected by yourRobotContainer
class.- Overrides:
autonomousInit
in classIterativeRobotBase
-
autonomousPeriodic
public void autonomousPeriodic()This function is called periodically during autonomous.- Overrides:
autonomousPeriodic
in classIterativeRobotBase
-
teleopInit
public void teleopInit()- Overrides:
teleopInit
in classIterativeRobotBase
-
teleopPeriodic
public void teleopPeriodic()This function is called periodically during operator control.- Overrides:
teleopPeriodic
in classIterativeRobotBase
-
testInit
public void testInit()- Overrides:
testInit
in classIterativeRobotBase
-
testPeriodic
public void testPeriodic()This function is called periodically during test mode.- Overrides:
testPeriodic
in classIterativeRobotBase
-
simulationInit
public void simulationInit()This function is called once when the robot is first started up.- Overrides:
simulationInit
in classIterativeRobotBase
-
simulationPeriodic
public void simulationPeriodic()This function is called periodically whilst in simulation.- Overrides:
simulationPeriodic
in classIterativeRobotBase
-