|
Lamp-Da 0.1
A compact lantern project
|
Decide when to blink, independently of the hardware. More...
#include <battery_blink.h>
Public Member Functions | |
| void | reset (const uint32_t time_ms) |
| Call when the output mode is entered: all the levels under the current one can be displayed again. | |
| bool | update (const uint32_t time_ms, const uint16_t level, const bool isLevelValid, const bool canBlink) |
| Call regularly during the output mode. | |
Decide when to blink, independently of the hardware.
| bool lampda::logic::battery_blink::BlinkTracker::update | ( | const uint32_t | time_ms, |
| const uint16_t | level, | ||
| const bool | isLevelValid, | ||
| const bool | canBlink | ||
| ) |
Call regularly during the output mode.
| [in] | time_ms | The current time |
| [in] | level | The battery level, in percent * 100 |
| [in] | isLevelValid | If false, level is ignored |
| [in] | canBlink | If false, the next blink is delayed |