Package frc.spectrumLib.framework
Class SpectrumRobot
java.lang.Object
edu.wpi.first.wpilibj.RobotBase
edu.wpi.first.wpilibj.IterativeRobotBase
edu.wpi.first.wpilibj.TimedRobot
frc.spectrumLib.framework.SpectrumRobot
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
Robot
Base robot class for Spectrum robots. The constructor silences joystick connection warnings and
sets the loop overrun watchdog to
LOOP_OVERRUN_WARNING_SECONDS.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleLoop length past which WPILib prints "Loop time of Xs overrun" and a per-section epoch breakdown to the Driver Station.Fields inherited from class edu.wpi.first.wpilibj.TimedRobot
kDefaultPeriod -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class edu.wpi.first.wpilibj.TimedRobot
addPeriodic, addPeriodic, addPeriodic, addPeriodic, close, endCompetition, getLoopStartTime, startCompetitionMethods inherited from class edu.wpi.first.wpilibj.IterativeRobotBase
autonomousExit, autonomousInit, autonomousPeriodic, disabledExit, disabledInit, disabledPeriodic, driverStationConnected, enableLiveWindowInTest, getPeriod, isLiveWindowEnabledInTest, loopFunc, printWatchdogEpochs, robotInit, robotPeriodic, setNetworkTablesFlushEnabled, simulationInit, simulationPeriodic, teleopExit, teleopInit, teleopPeriodic, testExit, testInit, testPeriodicMethods inherited from class edu.wpi.first.wpilibj.RobotBase
getMainThreadId, getRuntimeType, isAutonomous, isAutonomousEnabled, isDisabled, isEnabled, isReal, isSimulation, isTeleop, isTeleopEnabled, isTest, isTestEnabled, startRobot, suppressExitWarning
-
Field Details
-
LOOP_OVERRUN_WARNING_SECONDS
public static final double LOOP_OVERRUN_WARNING_SECONDSLoop length past which WPILib prints "Loop time of Xs overrun" and a per-section epoch breakdown to the Driver Station. WPILib's own default is 0.5 s.Every overrun below this value stays off the console. In the 2026-09-05 logs 60 to 90 percent of enabled loops ran over 25 ms. The
Scheduler/*timers in the wpilog are the record to read instead. Drop this to 0.04 for a diagnostic build that wants the per-section print, keeping in mind the print is itself work the loop has to do.- See Also:
-
-
Constructor Details
-
SpectrumRobot
public SpectrumRobot()
-