Class BaseRobot

java.lang.Object
edu.wpi.first.wpilibj.RobotBase
edu.wpi.first.wpilibj.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, properties, scheduling, and the injector. Required for a fair amount of CommonLib functionality.
  • Field Details

  • Constructor Details

    • BaseRobot

      public BaseRobot()
  • Method Details

    • 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.
      Overrides:
      robotInit in class IterativeRobotBase
    • getEnableTypeString

      protected String getEnableTypeString()
    • updateLoggingContext

      protected void updateLoggingContext()
    • initializeSystems

      protected void initializeSystems()
    • disabledInit

      public void disabledInit()
      Overrides:
      disabledInit in class IterativeRobotBase
    • disabledPeriodic

      public void disabledPeriodic()
      Overrides:
      disabledPeriodic in class IterativeRobotBase
    • getMatchContextString

      protected String getMatchContextString()
    • autonomousInit

      public void autonomousInit()
      Overrides:
      autonomousInit in class IterativeRobotBase
    • autonomousPeriodic

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

      public void teleopInit()
      Overrides:
      teleopInit in class IterativeRobotBase
    • teleopPeriodic

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

      public void testPeriodic()
      This function is called periodically during test mode
      Overrides:
      testPeriodic in class IterativeRobotBase
    • sharedPeriodic

      protected void sharedPeriodic()
    • simulationInit

      public void simulationInit()
      Overrides:
      simulationInit in class IterativeRobotBase
    • simulationPeriodic

      public void simulationPeriodic()
      Overrides:
      simulationPeriodic in class IterativeRobotBase