31 std::function<void(std::span<frc::AddressableLED::LEDData>,
LEDWriterFn)>;
50 void ApplyTo(std::span<frc::AddressableLED::LEDData> data,
65 void ApplyTo(std::span<frc::AddressableLED::LEDData> data)
const;
130 units::meter_t ledSpacing);
316 std::initializer_list<std::pair<double, Color>> steps);
Represents colors that can be used with Addressable LEDs.
Definition: Color.h:24
Definition: LEDPattern.h:33
void ApplyTo(std::span< frc::AddressableLED::LEDData > data, LEDWriterFn writer) const
Writes the pattern to an LED buffer.
LEDPattern Breathe(units::second_t period)
Creates a pattern that brightens and dims this one over time.
LEDPattern Blink(units::second_t onTime, units::second_t offTime)
Creates a pattern that switches between playing this pattern and turning the entire LED strip off.
LEDPattern(LEDPatternFn impl)
LEDPattern SynchronizedBlink(std::function< bool()> signal)
Creates a pattern that blinks this one on and off in sync with a true/false signal.
static LEDPattern Solid(const Color color)
Creates a pattern that displays a single static color along the entire length of the LED strip.
LEDPattern AtBrightness(double relativeBrightness)
Creates a pattern that plays this one, but at a different brightness.
LEDPattern Blend(const LEDPattern &other)
Creates a pattern that displays outputs as a combination of this pattern and another.
void ApplyTo(std::span< frc::AddressableLED::LEDData > data) const
Writes the pattern to an LED buffer.
LEDPattern ScrollAtRelativeSpeed(units::hertz_t velocity)
Creates a pattern that plays this one scrolling up the buffer.
LEDPattern Mask(const LEDPattern &mask)
Similar to LEDPattern::Blend(const LEDPattern&), but performs a bitwise mask on each color channel ra...
LEDPattern Reversed()
Creates a pattern that displays this one in reverse.
static LEDPattern Rainbow(int saturation, int value)
Creates an LED pattern that displays a rainbow across the color wheel.
static LEDPattern Steps(std::span< const std::pair< double, Color > > steps)
Display a set of colors in steps across the length of the LED strip.
static LEDPattern Gradient(std::initializer_list< Color > colors)
Creates a pattern that displays a non-animated gradient of colors across the entire length of the LED...
LEDPattern OverlayOn(const LEDPattern &base)
Creates a pattern that plays this pattern overlaid on another.
LEDPattern ScrollAtAbsoluteSpeed(units::meters_per_second_t velocity, units::meter_t ledSpacing)
Creates a pattern that plays this one scrolling up an LED strip.
static LEDPattern ProgressMaskLayer(std::function< double()> progressFunction)
Creates a pattern that works as a mask layer for LEDPattern::Mask(const LEDPattern&) that illuminates...
LEDPattern Blink(units::second_t onTime)
Like LEDPattern::Blink(units::second_t), but where the "off" time is exactly equal to the "on" time.
static LEDPattern Steps(std::initializer_list< std::pair< double, Color > > steps)
Display a set of colors in steps across the length of the LED strip.
LEDPattern OffsetBy(int offset)
Creates a pattern that displays this one, but offset by a certain number of LEDs.
static LEDPattern kOff
A pattern that turns off all LEDs.
Definition: LEDPattern.h:249
static LEDPattern Gradient(std::span< const Color > colors)
Creates a pattern that displays a non-animated gradient of colors across the entire length of the LED...
Definition: AprilTagDetector_cv.h:11
std::function< void(std::span< frc::AddressableLED::LEDData >, LEDWriterFn)> LEDPatternFn
Accepts a data buffer (1st argument) and a callback (2nd argument) for writing data.
Definition: LEDPattern.h:31
std::function< void(int, frc::Color)> LEDWriterFn
Sets the LED at the given index to the given color.
Definition: LEDPattern.h:24
color
Definition: color.h:16