Class HYPERRobot

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public abstract class HYPERRobot
    extends edu.wpi.first.wpilibj.TimedRobot
    The HYPERRobot extends TimedRobot to provide code which is mostly the same in every robot. Commands and periodic events (through PeriodicScheduler run in every mode except test mode, where the LiveWindow runs.
    • Field Summary

      • Fields inherited from class edu.wpi.first.wpilibj.TimedRobot

        kDefaultPeriod
      • Fields inherited from class edu.wpi.first.wpilibj.IterativeRobotBase

        m_period
      • Fields inherited from class edu.wpi.first.wpilibj.RobotBase

        m_ds, MAIN_THREAD_ID
    • Constructor Summary

      Constructors 
      Constructor Description
      HYPERRobot()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void autonomousPeriodic()
      void disabledPeriodic()
      protected abstract void initCommands()
      Initialize commands.
      protected abstract void initHelpers()
      Initialize helper classes.
      protected abstract void initOI()
      Initialize the operator interface.
      protected abstract void initSubsystems()
      Initialize subsystems.
      void robotInit()
      Initialize the robot.
      void teleopPeriodic()
      • Methods inherited from class edu.wpi.first.wpilibj.TimedRobot

        finalize, getPeriod, startCompetition
      • Methods inherited from class edu.wpi.first.wpilibj.IterativeRobotBase

        autonomousInit, disabledInit, loopFunc, robotPeriodic, teleopInit, testInit, testPeriodic
      • Methods inherited from class edu.wpi.first.wpilibj.RobotBase

        close, free, getBooleanProperty, isAutonomous, isDisabled, isEnabled, isNewDataAvailable, isOperatorControl, isReal, isSimulation, isTest, startRobot
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HYPERRobot

        public HYPERRobot()
    • Method Detail

      • robotInit

        public final void robotInit()
        Initialize the robot. This initializes in the following order:
        • Operator Interface (buttons and joysticks, not commands)
        • Subsystems (which in turn initialize hardware like speed controllers
        • "Helper classes" which depend on subsystems but have commands which depend on them (like UserDrive and Vision in hypercode)
        • Commands, including autonomous commands and commands on the OI
        Overrides:
        robotInit in class edu.wpi.first.wpilibj.IterativeRobotBase
      • initOI

        protected abstract void initOI()
        Initialize the operator interface. This should create joysticks and buttons, but not any commands, as initCommands() will not be called until after this. If you are using the hyperLib OI, this is where you would call the constructor for the OI.
      • initSubsystems

        protected abstract void initSubsystems()
        Initialize subsystems. This is where you should call the constructors for any subsystems. The subsystems may reference the joysticks/buttons on the OI, as they will have already been initialized at this point.
      • initHelpers

        protected abstract void initHelpers()
        Initialize helper classes. For example, in hypercode, UserDrive is a class which manages the drive modes in teleop. This class depends on the DriveTrain but has commands which depend on it in the OI. For any classes like this, initialize them here.
      • initCommands

        protected abstract void initCommands()
        Initialize commands. This is where you should add commands to the OI and the autonomous command chooser. If you are using the hyperLib OI, this is where you should call OI.initCommands()
      • disabledPeriodic

        public void disabledPeriodic()
        Overrides:
        disabledPeriodic in class edu.wpi.first.wpilibj.IterativeRobotBase
      • autonomousPeriodic

        public void autonomousPeriodic()
        Overrides:
        autonomousPeriodic in class edu.wpi.first.wpilibj.IterativeRobotBase
      • teleopPeriodic

        public void teleopPeriodic()
        Overrides:
        teleopPeriodic in class edu.wpi.first.wpilibj.IterativeRobotBase