mirror of https://github.com/arendst/Tasmota.git
Safeguard if delay is too high
This commit is contained in:
parent
ed455df760
commit
02df35b6b5
|
@ -262,6 +262,7 @@ static ICACHE_RAM_ATTR void timer1Interrupt() {
|
||||||
// Check for toggles
|
// Check for toggles
|
||||||
int32_t cyclesToGo = wave->nextServiceCycle - now;
|
int32_t cyclesToGo = wave->nextServiceCycle - now;
|
||||||
if (cyclesToGo < 0) {
|
if (cyclesToGo < 0) {
|
||||||
|
cyclesToGo = -((-cyclesToGo) % (wave->nextTimeHighCycles + wave->nextTimeLowCycles));
|
||||||
waveformState ^= mask;
|
waveformState ^= mask;
|
||||||
if (waveformState & mask) {
|
if (waveformState & mask) {
|
||||||
if (i == 16) {
|
if (i == 16) {
|
||||||
|
|
Loading…
Reference in New Issue