From 27dc8059d78a6666ebb2c844ad64f952416d89bf Mon Sep 17 00:00:00 2001 From: Asbelos Date: Fri, 19 Jul 2024 09:29:43 +0100 Subject: [PATCH] Broadcast loco forgets. --- CommandDistributor.cpp | 4 ++++ CommandDistributor.h | 1 + DCC.cpp | 6 +++++- version.h | 3 ++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CommandDistributor.cpp b/CommandDistributor.cpp index e7087ad..d2cf3f9 100644 --- a/CommandDistributor.cpp +++ b/CommandDistributor.cpp @@ -248,6 +248,10 @@ void CommandDistributor::broadcastLoco(byte slot) { #endif } +void CommandDistributor::broadcastForgetLoco(int16_t loco) { + broadcastReply(COMMAND_TYPE, F("\n<- %d>\n"), loco,loco); +} + void CommandDistributor::broadcastPower() { char pstr[] = "? x"; for(byte t=0; t=0) { speedTable[reg].loco=0; setThrottle2(cab,1); // ESTOP if this loco still on track + CommandDistributor::broadcastForgetLoco(cab); } } void DCC::forgetAllLocos() { // removes all speed reminders setThrottle2(0,1); // ESTOP all locos still on track - for (int i=0;i