SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
|
A base class for LED blinker classes. More...
#include <sensesp/system/led_blinker.h>
Public Member Functions | |
BaseBlinker (int pin) | |
void | set_state (bool state) |
void | flip_state () |
void | blip (int duration=20) |
void | set_enabled (bool state) |
virtual void | tick ()=0 |
void | start () override |
Public Member Functions inherited from sensesp::Startable | |
Startable (int priority=0) | |
const int | get_start_priority () |
void | set_start_priority (int priority) |
Protected Attributes | |
int | pin_ |
bool | enabled_ = true |
bool | state_ = false |
int | update_counter_ = 0 |
Reaction * | reaction_ = NULL |
Additional Inherited Members | |
Static Public Member Functions inherited from sensesp::Startable | |
static void | start_all () |
A base class for LED blinker classes.
Definition at line 16 of file led_blinker.h.
sensesp::BaseBlinker::BaseBlinker | ( | int | pin | ) |
Definition at line 11 of file led_blinker.cpp.
Flip the LED off and on for duration
milliseconds.
Definition at line 30 of file led_blinker.cpp.
void sensesp::BaseBlinker::flip_state | ( | ) |
Invert the current LED state.
Definition at line 25 of file led_blinker.cpp.
Enable or disable the blinker.
Definition at line 65 of file led_blinker.cpp.
Turn the LED on or off.
Definition at line 16 of file led_blinker.cpp.
|
overridevirtual |
Called during the initialization process. Override this method to add runtime initialization code to your class
Reimplemented from sensesp::Startable.
Definition at line 78 of file led_blinker.cpp.
Tick is called whenever the blinker is enabled or when it's time to change the LED state.
Implemented in sensesp::EvenBlinker, sensesp::RatioBlinker, and sensesp::PatternBlinker.
Definition at line 32 of file led_blinker.h.
|
protected |
Definition at line 31 of file led_blinker.h.
Definition at line 35 of file led_blinker.h.
Definition at line 33 of file led_blinker.h.
|
protected |
Definition at line 34 of file led_blinker.h.