fix pulsetime for more than 8 relays/power devices

This commit is contained in:
Barbudor 2021-12-04 15:03:15 +01:00
parent b9a34326d6
commit 2f9172a59f
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);
}
}