Class SpectrumRobot

All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
Robot

public class SpectrumRobot extends LoggedRobot
Base robot class for Spectrum robots on SystemCore: AdvantageKit's LoggedRobot, which runs the loop, records every input, and drives replay.
  • Field Details

    • LOOP_OVERRUN_WARNING_SECONDS

      public static final double LOOP_OVERRUN_WARNING_SECONDS
      Loop length above which WPILib prints "Loop time of Xs overrun" plus a per-section epoch breakdown to the Driver Station.

      0.20 s keeps the console quiet in matches. It also hides everything below it: in the 2026-09-05 roboRIO logs 60 to 90 percent of enabled loops ran over 25 ms and none of that reached the console. AdvantageKit's /RealOutputs/LoggedRobot/* timings and the Scheduler/* timers are the record of loop time.

      See Also:
  • Constructor Details

    • SpectrumRobot

      public SpectrumRobot(double periodSeconds)
      Starts the robot loop at periodSeconds and sets the loop overrun watchdogs to LOOP_OVERRUN_WARNING_SECONDS.
      Parameters:
      periodSeconds - the robot loop period; SystemCore runs 0.01 (100 Hz) comfortably