Package org.wildstang.sample.robot
Class Robot
- java.lang.Object
-
- edu.wpi.first.wpilibj.RobotBase
-
- edu.wpi.first.wpilibj.IterativeRobotBase
-
- edu.wpi.first.wpilibj.TimedRobot
-
- org.wildstang.sample.robot.Robot
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class Robot extends edu.wpi.first.wpilibj.TimedRobot
Once the Main class starts this class, the VM is configured to call the functions corresponding to each mode, as described in the IterativeRobotBase documentation. In summary, this class is the root of everything that the robot does. Everytime the driver station or FMS tells the robot to enter a new mode, this class handles that instruction. In general, this class should not be modified.- See Also:
- IterativeRobotBase
-
-
Constructor Summary
Constructors Constructor Description Robot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
autonomousInit()
Runs when autonomous is enabled.void
autonomousPeriodic()
Runs repeatedly while autonomous is enabled.void
disabledInit()
Runs when robot is disabled, announces that the robot has been disabled.void
disabledPeriodic()
Runs repeatedly while robot is disabled.void
robotInit()
Runs on initialization, creates and configures the framework Core.void
robotPeriodic()
Runs repeatedly, regardless of mode and state.void
teleopInit()
Runs when teleoperated is enabled.void
teleopPeriodic()
Runs repeatedly while teleoperated is enabled.void
testInit()
Runs when test is enabled.void
testPeriodic()
Runs repeatedly while test is enabled.-
Methods inherited from class edu.wpi.first.wpilibj.TimedRobot
addPeriodic, addPeriodic, close, endCompetition, startCompetition
-
Methods inherited from class edu.wpi.first.wpilibj.IterativeRobotBase
autonomousExit, disabledExit, enableLiveWindowInTest, getPeriod, isLiveWindowEnabledInTest, loopFunc, setNetworkTablesFlushEnabled, simulationInit, simulationPeriodic, teleopExit, testExit
-
-
-
-
Method Detail
-
robotInit
public void robotInit()
Runs on initialization, creates and configures the framework Core.- Overrides:
robotInit
in classedu.wpi.first.wpilibj.IterativeRobotBase
-
disabledInit
public void disabledInit()
Runs when robot is disabled, announces that the robot has been disabled.- Overrides:
disabledInit
in classedu.wpi.first.wpilibj.IterativeRobotBase
-
autonomousInit
public void autonomousInit()
Runs when autonomous is enabled. Resets all the subsystems, then starts the currently selected (and locked in) auto program.- Overrides:
autonomousInit
in classedu.wpi.first.wpilibj.IterativeRobotBase
-
teleopInit
public void teleopInit()
Runs when teleoperated is enabled. Cleans up from autonomous then resets all the subsystems. Note: once teleopInit() is called auto cannot be run again.- Overrides:
teleopInit
in classedu.wpi.first.wpilibj.IterativeRobotBase
-
testInit
public void testInit()
Runs when test is enabled. Currently does nothing.- Overrides:
testInit
in classedu.wpi.first.wpilibj.IterativeRobotBase
- See Also:
- robot_framework#10
-
robotPeriodic
public void robotPeriodic()
Runs repeatedly, regardless of mode and state. Tells the core to run each manager.- Overrides:
robotPeriodic
in classedu.wpi.first.wpilibj.IterativeRobotBase
- See Also:
- robot_framework#26
-
disabledPeriodic
public void disabledPeriodic()
Runs repeatedly while robot is disabled. Currently does nothing.- Overrides:
disabledPeriodic
in classedu.wpi.first.wpilibj.IterativeRobotBase
-
autonomousPeriodic
public void autonomousPeriodic()
Runs repeatedly while autonomous is enabled. Tells the core to run each manager.- Overrides:
autonomousPeriodic
in classedu.wpi.first.wpilibj.IterativeRobotBase
-
teleopPeriodic
public void teleopPeriodic()
Runs repeatedly while teleoperated is enabled. Tells the core to run each manager.- Overrides:
teleopPeriodic
in classedu.wpi.first.wpilibj.IterativeRobotBase
-
testPeriodic
public void testPeriodic()
Runs repeatedly while test is enabled. Currently does nothing.- Overrides:
testPeriodic
in classedu.wpi.first.wpilibj.IterativeRobotBase
- See Also:
- robot_framework#10
-
-