From 04403bbf5eafdf5198744dd8183fda6c527d5fcf Mon Sep 17 00:00:00 2001 From: Ash-4 <81280775+Ash-4@users.noreply.github.com> Date: Thu, 10 Jun 2021 13:23:00 -0500 Subject: [PATCH] Update DCC.cpp (#165) lines 906-910 added. avoid wait after write. use 1 PROG --- DCC.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DCC.cpp b/DCC.cpp index 5aaf5c1..226425b 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -904,6 +904,10 @@ void DCC::callback(int value) { switch (callbackState) { case AFTER_WRITE: // first attempt to callback after a write operation + if (!ackManagerRejoin && !DCCWaveform::progTrack.autoPowerOff) { + callbackState=READY; + break; + } // lines 906-910 added. avoid wait after write. use 1 PROG callbackStart=millis(); callbackState=WAITING_100; if (Diag::ACK) DIAG(F("Stable 100mS"));