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:
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:
-
Field Summary
Fields inherited from class edu.wpi.first.wpilibj.TimedRobot
kDefaultPeriod -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRuns when autonomous is enabled.voidRuns repeatedly while autonomous is enabled.voidRuns when robot is disabled, announces that the robot has been disabled.voidRuns repeatedly while robot is disabled.voidRuns on initialization, creates and configures the framework Core.voidRuns repeatedly, regardless of mode and state.voidRuns when teleoperated is enabled.voidRuns repeatedly while teleoperated is enabled.voidtestInit()Runs when test is enabled.voidRuns repeatedly while test is enabled.Methods inherited from class edu.wpi.first.wpilibj.TimedRobot
addPeriodic, addPeriodic, addPeriodic, addPeriodic, close, endCompetition, getLoopStartTime, startCompetitionMethods inherited from class edu.wpi.first.wpilibj.IterativeRobotBase
autonomousExit, disabledExit, driverStationConnected, enableLiveWindowInTest, getPeriod, isLiveWindowEnabledInTest, loopFunc, printWatchdogEpochs, setNetworkTablesFlushEnabled, simulationInit, simulationPeriodic, teleopExit, testExitMethods 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()
-
-
Method Details
-
robotInit
public void robotInit()Runs on initialization, creates and configures the framework Core.- Overrides:
robotInitin classedu.wpi.first.wpilibj.IterativeRobotBase
-
disabledInit
public void disabledInit()Runs when robot is disabled, announces that the robot has been disabled.- Overrides:
disabledInitin 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:
autonomousInitin 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:
teleopInitin classedu.wpi.first.wpilibj.IterativeRobotBase
-
testInit
public void testInit()Runs when test is enabled. Currently does nothing.- Overrides:
testInitin classedu.wpi.first.wpilibj.IterativeRobotBase- See Also:
-
robotPeriodic
public void robotPeriodic()Runs repeatedly, regardless of mode and state. Tells the core to run each manager.- Overrides:
robotPeriodicin classedu.wpi.first.wpilibj.IterativeRobotBase- See Also:
-
disabledPeriodic
public void disabledPeriodic()Runs repeatedly while robot is disabled. Currently does nothing.- Overrides:
disabledPeriodicin classedu.wpi.first.wpilibj.IterativeRobotBase
-
autonomousPeriodic
public void autonomousPeriodic()Runs repeatedly while autonomous is enabled. Tells the core to run each manager.- Overrides:
autonomousPeriodicin classedu.wpi.first.wpilibj.IterativeRobotBase
-
teleopPeriodic
public void teleopPeriodic()Runs repeatedly while teleoperated is enabled. Tells the core to run each manager.- Overrides:
teleopPeriodicin classedu.wpi.first.wpilibj.IterativeRobotBase
-
testPeriodic
public void testPeriodic()Runs repeatedly while test is enabled. Currently does nothing.- Overrides:
testPeriodicin classedu.wpi.first.wpilibj.IterativeRobotBase- See Also:
-