Bsongis/telemetry clean session (#6597)

Telemetry cleaning session
This commit is contained in:
Bertrand Songis
2019-08-02 21:31:03 +02:00
committed by GitHub
parent 5b516b8287
commit 39f29860c9
13 changed files with 151 additions and 172 deletions
+2 -1
View File
@@ -784,10 +784,11 @@ void logicalSwitchesTimerTick()
for (uint8_t i=0; i<MAX_LOGICAL_SWITCHES; i++) {
LogicalSwitchData * ls = lswAddress(i);
if (ls->func == LS_FUNC_TIMER) {
int16_t *lastValue = &LS_LAST_VALUE(fm, i);
int16_t * lastValue = &LS_LAST_VALUE(fm, i);
if (*lastValue == 0 || *lastValue == CS_LAST_VALUE_INIT) {
*lastValue = -lswTimerValue(ls->v1);
}
else if (*lastValue < 0) {
if (++(*lastValue) == 0)
*lastValue = lswTimerValue(ls->v2);