@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user