Fix reading second delay for single digit (< 1s)

This commit is contained in:
Raphael Coeffic
2021-11-27 08:48:34 +01:00
committed by Raphael Coeffic
parent 603e5d2646
commit da36a56dff
@@ -1482,10 +1482,9 @@ static void r_logicSw(void* user, uint8_t* data, uint32_t bitoffs,
ls->v2 = timerValue2lsw(yaml_str2uint_ref(val, val_len)); ls->v2 = timerValue2lsw(yaml_str2uint_ref(val, val_len));
if (!val_len || val[0] != ',') return; if (!val_len || val[0] != ',') return;
val++; val_len--; val++; val_len--;
if (val_len == 1) { if (val_len == 1 && val[0] == '<') {
if (val[0] == '<') ls->v3 = -1;
ls->v3 = -1; } else if (val_len == 1 && val[0] == '-') {
else if (val[0] == '-')
ls->v3 = 0; ls->v3 = 0;
} else { } else {
int16_t t = (int16_t)timerValue2lsw(yaml_str2uint_ref(val, val_len)); int16_t t = (int16_t)timerValue2lsw(yaml_str2uint_ref(val, val_len));