Merge pull request #13920 from barbudor/fix_pulsetime_over_8

fix pulsetime for more than 8 relays/power devices
This commit is contained in:
Theo Arends 2021-12-04 15:38:44 +01:00 committed by GitHub
commit d3a1883782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1043,7 +1043,7 @@ void Every100mSeconds(void)
if (TasmotaGlobal.pulse_timer[i] != 0L) { // Timer active?
if (TimeReached(TasmotaGlobal.pulse_timer[i])) { // Timer finished?
TasmotaGlobal.pulse_timer[i] = 0L; // Turn off this timer
for (uint32_t j = 0; j < TasmotaGlobal.devices_present; j = j +MAX_PULSETIMERS) {
for (uint32_t j = 0; (i + j) < TasmotaGlobal.devices_present; j = j +MAX_PULSETIMERS) {
ExecuteCommandPower(i + j +1, (POWER_ALL_OFF_PULSETIME_ON == Settings->poweronstate) ? POWER_ON : POWER_OFF, SRC_PULSETIMER);
}
}