From b026417efb6e927deee9ac8b492c07865afee9a7 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Fri, 6 Sep 2024 09:28:40 +0200 Subject: [PATCH] EXTRAIL: Propagate a failed loco addr read to EXRAIL so it can be used as IFLOCO(-1) --- EXRAIL2.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/EXRAIL2.cpp b/EXRAIL2.cpp index bfa011d..f228f1f 100644 --- a/EXRAIL2.cpp +++ b/EXRAIL2.cpp @@ -926,11 +926,10 @@ void RMFT2::loop2() { delayMe(100); return; // still waiting for callback } - if (progtrackLocoId<0) { - kill(F("No Loco Found"),progtrackLocoId); - return; // still waiting for callback - } + // At failed read will result in loco == -1 + // which is intended so it can be checked + // from within EXRAIL loco=progtrackLocoId; speedo=0; forward=true;