1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-24 05:11: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; state = 0;
break; 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; return false;
} }
@ -190,11 +195,6 @@ void DCCWaveform::interrupt2() {
} }
} }
} }
// 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();
} }