1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 12:51:24 +01:00

Update DCCWaveform.cpp

This commit is contained in:
Asbelos 2020-07-03 17:12:53 +01:00
parent 53769205e4
commit dc13a0e209

View File

@ -140,6 +140,11 @@ bool DCCWaveform::interrupt1() {
state = 0;
break;
}
// ACK check is prog track only and will only be checked if
// this is not case(0) which needs relatively expensive packet change code to be called.
if (ackPending) checkAck();
return false;
}
@ -189,12 +194,7 @@ void DCCWaveform::interrupt2() {
if (sentResetsSincePacket<250) sentResetsSincePacket++;
}
}
}
// ACK check is prog track only and will only be checked if bits_sent=4 ...
// This means only once per 9-bit-byte AND never at the same cycle as the
// relatively expensive packet change code just above.
if (ackPending && bits_sent==4) checkAck();
}
}