L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
Loading...
Searching...
No Matches
valueChanger_t Struct Reference

Value-stability detector – determines when a periodically updated value has remained unchanged for a configured time window. More...

#include <utils.h>

Collaboration diagram for valueChanger_t:
[legend]

Data Fields

TVAL LastValue
sleeper_t Timer
uint8_t IsLocked

Detailed Description

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.

Definition at line 108 of file utils.h.

Field Documentation

◆ IsLocked

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().

◆ LastValue

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().

◆ Timer

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().


The documentation for this struct was generated from the following file: