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

Bugfix: setJoin(true) should not change anythiung if there is no PROG track

This commit is contained in:
Harald Barth
2025-07-26 00:00:35 +02:00
parent 8b7d87d6bd
commit a593321346

View File

@@ -703,9 +703,11 @@ void TrackManager::setJoin(bool joined) {
setTrackMode(t, TRACK_MODE_MAIN, 0, false); // 0 = no DC loco; false = do not turn off pwr setTrackMode(t, TRACK_MODE_MAIN, 0, false); // 0 = no DC loco; false = do not turn off pwr
// then in some cases setPower() is called // then in some cases setPower() is called
// seperately after the setJoin() as well // seperately after the setJoin() as well
break; // there is only one prog track, done goto success; // there is only one prog track, done
} }
} }
return; // no prog track found, can not do more
success: /* continue here when prog tack found */;
} else { } else {
if (tempProgTrack != MAX_TRACKS+1) { if (tempProgTrack != MAX_TRACKS+1) {
// setTrackMode defaults to power off, so we // setTrackMode defaults to power off, so we