SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
|
A periodic blinker that defines both the on-ratio and the period length. More...
#include <sensesp/system/led_blinker.h>
Public Member Functions | |
RatioBlinker (int pin, unsigned int period, float ratio=0.) | |
void | tick () override final |
void | set_ratio (unsigned int ratio) |
Public Member Functions inherited from sensesp::PeriodicBlinker | |
PeriodicBlinker (int pin, unsigned int period) | |
void | set_period (unsigned int period) |
Public Member Functions inherited from sensesp::BaseBlinker | |
BaseBlinker (int pin) | |
void | set_state (bool state) |
void | flip_state () |
void | blip (int duration=20) |
void | set_enabled (bool state) |
Protected Attributes | |
float | ratio_ |
Protected Attributes inherited from sensesp::PeriodicBlinker | |
unsigned int | period_ |
Protected Attributes inherited from sensesp::BaseBlinker | |
int | pin_ |
bool | enabled_ = true |
bool | state_ = false |
int | update_counter_ = 0 |
reactesp::Event * | event_ = NULL |
A periodic blinker that defines both the on-ratio and the period length.
Definition at line 62 of file led_blinker.h.
sensesp::RatioBlinker::RatioBlinker | ( | int | pin, |
unsigned int | period, | ||
float | ratio = 0. ) |
Definition at line 98 of file led_blinker.cpp.
|
inline |
Definition at line 66 of file led_blinker.h.
|
finaloverridevirtual |
Tick is called whenever the blinker is enabled or when it's time to change the LED state.
Implements sensesp::BaseBlinker.
Definition at line 101 of file led_blinker.cpp.
|
protected |
Definition at line 69 of file led_blinker.h.