Blink the LED with a pattern specified by a vector of callback functions. More...
#include <sensesp/system/led_blinker.h>
Public Member Functions | |
LEDBlinker (CRGB &crgb, LEDPattern pattern, std::function< void()> show_func) | |
void | tick () |
void | set_pattern (const LEDPattern &pattern) |
void | add_modifier (const LEDPattern &modifier) |
Protected Attributes | |
CRGB & | crgb_ |
CRGB | last_color_ = CRGB::Black |
LEDPattern | pattern_ |
std::list< LEDPattern > | modifiers_ = {} |
std::function< void()> | show_func_ |
Blink the LED with a pattern specified by a vector of callback functions.
LED blinker class that blinks the LED with a pattern specified by a vector of callback functions. Each callback function is called in sequence, with the duration of each callback function specified in the LEDPatternFragment object.
In addition to the pattern, there can be one or more transient modifiers that modify the LED color during the pattern. These modifiers are applied in sequence on top of the pattern. They can be used e.g. to change the color, dim the LED, or apply a brief fade effect to indicate e.g. a button press or received data.
Definition at line 189 of file led_blinker.h.
|
inline |
Definition at line 191 of file led_blinker.h.
|
inline |
Definition at line 213 of file led_blinker.h.
|
inline |
Definition at line 211 of file led_blinker.h.
|
inline |
|
protected |
Definition at line 218 of file led_blinker.h.
|
protected |
Definition at line 219 of file led_blinker.h.
|
protected |
Definition at line 221 of file led_blinker.h.
|
protected |
Definition at line 220 of file led_blinker.h.
|
protected |
Definition at line 223 of file led_blinker.h.