From 4d80152ad0d888b61cd0f8092b2f8c9e0cc3e095 Mon Sep 17 00:00:00 2001 From: Asbelos Date: Tue, 9 Jun 2020 08:38:27 +0100 Subject: [PATCH] ACK Timer correction --- DCC.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DCC.cpp b/DCC.cpp index eb5dd2b..45193b7 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -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 } }