1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-28 18:03:45 +02:00

Broadcast loco forgets.

This commit is contained in:
Asbelos
2024-07-19 09:29:43 +01:00
parent dc2eae499f
commit 27dc8059d7
4 changed files with 12 additions and 2 deletions

View File

@@ -742,11 +742,15 @@ void DCC::forgetLoco(int cab) { // removes any speed reminders for this loco
if (reg>=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<MAX_LOCOS;i++) speedTable[i].loco=0;
for (int i=0;i<MAX_LOCOS;i++) {
if (speedTable[i].loco) CommandDistributor::broadcastForgetLoco(speedTable[i].loco);
speedTable[i].loco=0;
}
}
byte DCC::loopStatus=0;