Class BaseRobot

java.lang.Object
org.wpilib.framework.RobotBase
org.wpilib.framework.IterativeRobotBase
org.littletonrobotics.junction.LoggedRobot
xbot.common.command.BaseRobot
All Implemented Interfaces:
AutoCloseable

public abstract class BaseRobot extends org.littletonrobotics.junction.LoggedRobot
Core Robot class which configures logging, tunables, scheduling, and the injector. Required for a fair amount of CommonLib functionality.
  • Field Details

  • Constructor Details

    • BaseRobot

      public BaseRobot()
    • BaseRobot

      public BaseRobot(double loopInterval)
  • Method Details

    • startCompetition

      public void startCompetition()
      Initializes SCL before AdvantageKit starts simulation and the robot loop.
      Overrides:
      startCompetition in class org.littletonrobotics.junction.LoggedRobot
    • setupInjectionModule

      protected void setupInjectionModule()
      Override if you need a different module
    • createDaggerComponent

      protected abstract BaseComponent createDaggerComponent()
      Returns the BaseComponent instance used for dependency injection
    • getInjectorComponent

      protected BaseComponent getInjectorComponent()
      Get the dependency injection component
      Returns:
      an implementation of BaseComponent that will be used throughout the robot.
    • robotInit

      public void robotInit()
      This function is run when the robot is first started up and should be used for any initialization code.
    • getEnableTypeString

      protected String getEnableTypeString()
    • updateLoggingContext

      protected void updateLoggingContext()
    • initializeSystems

      protected void initializeSystems()
    • disabledInit

      public void disabledInit()
      Overrides:
      disabledInit in class org.wpilib.framework.IterativeRobotBase
    • disabledPeriodic

      public void disabledPeriodic()
      Overrides:
      disabledPeriodic in class org.wpilib.framework.IterativeRobotBase
    • getMatchContextString

      protected String getMatchContextString()
    • autonomousInit

      public void autonomousInit()
      Overrides:
      autonomousInit in class org.wpilib.framework.IterativeRobotBase
    • autonomousPeriodic

      public void autonomousPeriodic()
      This function is called periodically during autonomous
      Overrides:
      autonomousPeriodic in class org.wpilib.framework.IterativeRobotBase
    • teleopInit

      public void teleopInit()
      Overrides:
      teleopInit in class org.wpilib.framework.IterativeRobotBase
    • teleopPeriodic

      public void teleopPeriodic()
      This function is called periodically during operator control
      Overrides:
      teleopPeriodic in class org.wpilib.framework.IterativeRobotBase
    • testPeriodic

      public void testPeriodic()
      This function is called periodically during test mode
    • sharedPeriodic

      protected void sharedPeriodic()
    • refreshAllDataFrames

      public void refreshAllDataFrames()
    • simulationInit

      public void simulationInit()
      Overrides:
      simulationInit in class org.wpilib.framework.IterativeRobotBase
    • simulationPeriodic

      public void simulationPeriodic()
      Overrides:
      simulationPeriodic in class org.wpilib.framework.IterativeRobotBase
    • getPerformanceTimestampInMs

      protected double getPerformanceTimestampInMs()