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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Runs when autonomous is enabled.
    void
    Runs repeatedly while autonomous is enabled.
    void
    Runs when robot is disabled, announces that the robot has been disabled.
    void
    Runs repeatedly while robot is disabled.
    void
    Runs on initialization, creates and configures the framework Core.
    void
    Runs repeatedly, regardless of mode and state.
    void
    Runs when teleoperated is enabled.
    void
    Runs repeatedly while teleoperated is enabled.
    void
    Runs when test is enabled.
    void
    Runs repeatedly while test is enabled.

    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, setNetworkTablesFlushEnabled, simulationInit, simulationPeriodic, 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Robot

      public Robot()
  • Method Details

    • robotInit

      public void robotInit()
      Runs on initialization, creates and configures the framework Core.
      Overrides:
      robotInit in class edu.wpi.first.wpilibj.IterativeRobotBase
    • disabledInit

      public void disabledInit()
      Runs when robot is disabled, announces that the robot has been disabled.
      Overrides:
      disabledInit in class edu.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 class edu.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 class edu.wpi.first.wpilibj.IterativeRobotBase
    • testInit

      public void testInit()
      Runs when test is enabled. Currently does nothing.
      Overrides:
      testInit in class edu.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:
      robotPeriodic in class edu.wpi.first.wpilibj.IterativeRobotBase
      See Also:
    • disabledPeriodic

      public void disabledPeriodic()
      Runs repeatedly while robot is disabled. Currently does nothing.
      Overrides:
      disabledPeriodic in class edu.wpi.first.wpilibj.IterativeRobotBase
    • autonomousPeriodic

      public void autonomousPeriodic()
      Runs repeatedly while autonomous is enabled. Tells the core to run each manager.
      Overrides:
      autonomousPeriodic in class edu.wpi.first.wpilibj.IterativeRobotBase
    • teleopPeriodic

      public void teleopPeriodic()
      Runs repeatedly while teleoperated is enabled. Tells the core to run each manager.
      Overrides:
      teleopPeriodic in class edu.wpi.first.wpilibj.IterativeRobotBase
    • testPeriodic

      public void testPeriodic()
      Runs repeatedly while test is enabled. Currently does nothing.
      Overrides:
      testPeriodic in class edu.wpi.first.wpilibj.IterativeRobotBase
      See Also: