1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-23 08:06:13 +01:00

ACK Timer correction

This commit is contained in:
Asbelos 2020-06-09 08:38:27 +01:00
parent 50cbcabe00
commit 4d80152ad0

View File

@ -391,12 +391,12 @@ void DCC::ackManagerLoop() {
// not in pulse
if (ackPulseStart==0) return; // keep waiting for leading edge
{
{ // detected trailing edge of pulse
long pulseDuration=micros()-ackPulseStart;
// TODO handle timer wrapover
if (pulseDuration>4500 && pulseDuration<8500) {
if (pulseDuration>4500 && pulseDuration<8000) {
ackReceived=true;
DCCWaveform::progTrack.killRemainingRepeats(); // probabaly no need after 8.5ms!!
DCCWaveform::progTrack.killRemainingRepeats(); // probably no need after 8.5ms!!
break; // we have a genuine ACK result
}
}