Issue #650 fixed - 0.1s precision in durations/delays for logical

switches
This commit is contained in:
Bertrand Songis
2014-02-24 07:45:37 +01:00
parent c98e718e16
commit 56d167e45f
6 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -1589,13 +1589,13 @@ bool getSwitch(int8_t swtch)
result = false;
}
else {
cswDelays[cs_idx] = get_tmr10ms() + (cs->delay*50);
cswDelays[cs_idx] = get_tmr10ms() + (cs->delay*10);
}
}
if (cs->duration) {
if (result && !cswStates[cs_idx]) {
cswDurations[cs_idx] = get_tmr10ms() + (cs->duration*50);
cswDurations[cs_idx] = get_tmr10ms() + (cs->duration*10);
}
cswStates[cs_idx] = result;