|
SensESP 3.3.0
Universal Signal K sensor toolkit ESP32
|
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 190 of file led_blinker.h.
|
inline |
Definition at line 192 of file led_blinker.h.
|
inline |
Definition at line 214 of file led_blinker.h.
|
inline |
Definition at line 212 of file led_blinker.h.
|
inline |
|
protected |
Definition at line 219 of file led_blinker.h.
|
protected |
Definition at line 220 of file led_blinker.h.
|
protected |
Definition at line 222 of file led_blinker.h.
|
protected |
Definition at line 221 of file led_blinker.h.
|
protected |
Definition at line 224 of file led_blinker.h.