diff --git a/DCC.cpp b/DCC.cpp index 3d2d056..8524308 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -591,6 +591,7 @@ void DCC::issueReminders() { if ( DCCWaveform::mainTrack.getPacketPending()) return; // This loop searches for a loco in the speed table starting at nextLoco and cycling back around + /* for (int reg=0;reg=MAX_LOCOS) slot-=MAX_LOCOS; @@ -601,6 +602,17 @@ void DCC::issueReminders() { return; } } + */ + for (int reg=nextLoco;reg 0) { + // have found the next loco to remind + // issueReminder will return true if this loco is completed (ie speed and functions) + if (issueReminder(slot)) + nextLoco=(slot+1)%MAX_LOCOS; + return; + } + } } bool DCC::issueReminder(int reg) {