Package frc.robot.subsystems.leds
Class Leds
java.lang.Object
frc.spectrumLib.leds.SpectrumLEDs
frc.robot.subsystems.leds.Leds
- All Implemented Interfaces:
Subsystem
Robot LED subsystem for the 2026 REBUILT season.
Extends SpectrumLEDs to inherit the full pattern library (solid, stripe, blink,
breathe, rainbow, chase, bounce, gradient, ombre, wave, countdown, etc.) and the CANdle hardware
abstraction. Robot-specific convenience command methods are defined below; bind them via triggers
in Robot.java or SuperStructure.
Hardware: CANdle device ID 1 on the CANivore bus, 20-LED RGB external strip at brightness 0.5. LEDs are disabled on signal loss.
-
Nested Class Summary
Nested classes/interfaces inherited from class frc.spectrumLib.leds.SpectrumLEDs
SpectrumLEDs.CANdlePattern, SpectrumLEDs.Config -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SpectrumLEDs.ConfigStatic hardware config.static final intNumber of external LEDs attached to the CANdle output (indices 8–27 on the device).Fields inherited from class frc.spectrumLib.leds.SpectrumLEDs
candle, defaultCommand, defaultPattern, defaultTrigger, purple, white -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class frc.spectrumLib.leds.SpectrumLEDs
blink, bounce, breathe, chase, checkPriority, countdown, edges, fire, getCandle, getCommandPriority, getConfig, getCurrentCommandName, gradient, isAnimating, isAttached, ombre, rainbow, rainbow, rgbCycle, scrollingRainbow, setCommandPriority, setPattern, setPattern, solid, stripe, switchCountdown, waveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, getName, idle, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Field Details
-
NUM_LEDS
public static final int NUM_LEDSNumber of external LEDs attached to the CANdle output (indices 8–27 on the device).- See Also:
-
ledsConfig
Static hardware config. SetstartIdx = 8to address only the external strip (skipping the 8 onboard CANdle LEDs); keep at0to address all 20 LEDs starting from the first onboard LED.
-
-
Constructor Details
-
Leds
public Leds()
-
-
Method Details
-
periodic
public void periodic()
-