Package frc.robot
Class Robot
java.lang.Object
edu.wpi.first.wpilibj.RobotBase
edu.wpi.first.wpilibj.IterativeRobotBase
org.littletonrobotics.junction.LoggedRobot
frc.robot.Robot
- All Implemented Interfaces:
AutoCloseable
public class Robot
extends org.littletonrobotics.junction.LoggedRobot
Runs tasks on Roborio in this file.
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.littletonrobotics.junction.LoggedRobot
defaultPeriodSecs
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This autonomous runs the autonomous command selected by yourRobotContainer
class.void
This function is called periodically during autonomous.void
void
static String
Finds the path to a log file for replay, using the following priorities: 1.void
This function is run when the robot is first started up and should be used for any initialization code.void
This function is called every robot packet, no matter the mode.void
void
This function is called periodically during operator control.void
testInit()
void
This function is called periodically during test mode.Methods inherited from class org.littletonrobotics.junction.LoggedRobot
endCompetition, finalize, setUseTiming, startCompetition
Methods inherited from class edu.wpi.first.wpilibj.IterativeRobotBase
autonomousExit, disabledExit, driverStationConnected, enableLiveWindowInTest, getPeriod, isLiveWindowEnabledInTest, loopFunc, setNetworkTablesFlushEnabled, simulationInit, simulationPeriodic, teleopExit, testExit
Methods inherited from class edu.wpi.first.wpilibj.RobotBase
close, getMainThreadId, getRuntimeType, isAutonomous, isAutonomousEnabled, isDisabled, isEnabled, isReal, isSimulation, isTeleop, isTeleopEnabled, isTest, isTestEnabled, startRobot, suppressExitWarning
-
Field Details
-
robotRunType
-
-
Constructor Details
-
Robot
public Robot()
-
-
Method Details
-
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 classIterativeRobotBase
-
robotPeriodic
public void robotPeriodic()This function is called every robot packet, no matter the mode. Use this for items like diagnostics that you want ran during disabled, autonomous, teleoperated and test.This runs after the mode specific periodic functions, but before LiveWindow and SmartDashboard integrated updating.
- Overrides:
robotPeriodic
in classIterativeRobotBase
-
disabledInit
public void disabledInit()- Overrides:
disabledInit
in classIterativeRobotBase
-
disabledPeriodic
public void disabledPeriodic()- Overrides:
disabledPeriodic
in classIterativeRobotBase
-
autonomousInit
public void autonomousInit()This autonomous runs the autonomous command selected by yourRobotContainer
class.- Overrides:
autonomousInit
in classIterativeRobotBase
-
autonomousPeriodic
public void autonomousPeriodic()This function is called periodically during autonomous.- Overrides:
autonomousPeriodic
in classIterativeRobotBase
-
teleopInit
public void teleopInit()- Overrides:
teleopInit
in classIterativeRobotBase
-
teleopPeriodic
public void teleopPeriodic()This function is called periodically during operator control.- Overrides:
teleopPeriodic
in classIterativeRobotBase
-
testInit
public void testInit()- Overrides:
testInit
in classIterativeRobotBase
-
testPeriodic
public void testPeriodic()This function is called periodically during test mode.- Overrides:
testPeriodic
in classIterativeRobotBase
-
findReplayLog
Finds the path to a log file for replay, using the following priorities: 1. The value of the "AKIT_LOG_PATH" environment variable, if set 2. The file currently open in AdvantageScope, if available 3. The result of the prompt displayed to the user
-