Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lampda::logic::battery_blink::BlinkTracker Class Reference

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.
 

Detailed Description

Decide when to blink, independently of the hardware.

Member Function Documentation

◆ update()

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.

Parameters
[in]time_msThe current time
[in]levelThe battery level, in percent * 100
[in]isLevelValidIf false, level is ignored
[in]canBlinkIf false, the next blink is delayed
Returns
true if a blink should start now

The documentation for this class was generated from the following files: