1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

reset speed and loosen brake

This commit is contained in:
Harald Barth 2022-05-24 08:07:33 +02:00
parent 55196c2e7d
commit 55561188e1
2 changed files with 4 additions and 3 deletions

View File

@ -1 +1 @@
#define GITHUB_SHA "TM-PORTX-20220523"
#define GITHUB_SHA "TM-PORTX-20220524"

View File

@ -168,8 +168,9 @@ bool TrackManager::setTrackMode(byte trackToSet, TRACK_MODE mode, int16_t dcAddr
}
else {
// DCC tracks need to have set the PWM to zero or they will not work.
// 128 is speed=0 and dir=0
// 128 is speed=0 and dir=0 and then loosen brake.
track[trackToSet]->setDCSignal(128);
track[trackToSet]->setBrake(false);
}
// EXT is a special case where the signal pin is
@ -201,7 +202,7 @@ bool TrackManager::setTrackMode(byte trackToSet, TRACK_MODE mode, int16_t dcAddr
// Normal running tracks are set to the global power state
track[trackToSet]->setPower(
(mode==TRACK_MODE_MAIN || mode==TRACK_MODE_DC || mode==TRACK_MODE_DCX) ?
(mode==TRACK_MODE_MAIN || mode==TRACK_MODE_DC || mode==TRACK_MODE_DCX || mode==TRACK_MODE_EXT) ?
mainPowerGuess : POWERMODE::OFF);
//DIAG(F("TrackMode=%d"),mode);
return true;