Package frc.spectrumLib.leds
Interface SpectrumLEDs.CANdlePattern
- Enclosing class:
- SpectrumLEDs
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for a LED pattern that drives a segment of a
CANdle strip.
Implementations receive the live CANdle device, the first LED index in this
instance's segment (startIdx), and the number of LEDs in the segment (
numLeds). Hardware animation patterns call CoreCANdle.setControl(com.ctre.phoenix6.controls.ModulateVBatOut), software patterns call
CoreCANdle.setControl(SolidColor) (one-shot, resent each loop).
-
Method Summary
-
Method Details
-
applyTo
Apply this pattern to the given LED segment.- Parameters:
candle- theCANdledevice to write tostartIdx- the first LED index (inclusive);0includes the 8 onboard LEDsnumLeds- the number of LEDs in this segment
-