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.TimedRobotOnce 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 voidautonomousInit()Runs when autonomous is enabled.voidautonomousPeriodic()Runs repeatedly while autonomous is enabled.voiddisabledInit()Runs when robot is disabled, announces that the robot has been disabled.voiddisabledPeriodic()Runs repeatedly while robot is disabled.voidrobotInit()Runs on initialization, creates and configures the framework Core.voidrobotPeriodic()Runs repeatedly, regardless of mode and state.voidteleopInit()Runs when teleoperated is enabled.voidteleopPeriodic()Runs repeatedly while teleoperated is enabled.voidtestInit()Runs when test is enabled.voidtestPeriodic()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:
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:
- robot_framework#10
-
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:
- robot_framework#26
-
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:
- robot_framework#10
-
-