|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Value-stability detector – determines when a periodically updated value has remained unchanged for a configured time window. More...
#include <utils.h>
Data Fields | |
| TVAL | LastValue |
| sleeper_t | Timer |
| uint8_t | IsLocked |
Value-stability detector – determines when a periodically updated value has remained unchanged for a configured time window.
Call valueChanger_SetValue() each time a new sample arrives. The function returns 1 only when the value has been stable (unchanged) for the full duration specified at initialisation.
When IsLocked is set, valueChanger_SetValue() always returns 0 until a different value is provided, at which point the lock is automatically cleared.
| uint8_t valueChanger_t::IsLocked |
1 – locked (SetValue always returns 0); 0 – normal
Definition at line 112 of file utils.h.
Referenced by valueChanger_Inic(), valueChanger_Lock(), and valueChanger_SetValue().
| TVAL valueChanger_t::LastValue |
Most recently accepted value
Definition at line 110 of file utils.h.
Referenced by valueChanger_GetValue(), valueChanger_Inic(), and valueChanger_SetValue().
| sleeper_t valueChanger_t::Timer |
Stability timer – restarted whenever the value changes
Definition at line 111 of file utils.h.
Referenced by valueChanger_Inic(), and valueChanger_SetValue().