mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-24 08:36:14 +01:00
Compare commits
No commits in common. "ef47257d67afc8b66f33b0cbbaea10e4cdddb6e7" and "4308739c2b7663e47411c6624f626e4087cef268" have entirely different histories.
ef47257d67
...
4308739c2b
|
@ -1 +1 @@
|
|||
#define GITHUB_SHA "devel-202311220953Z"
|
||||
#define GITHUB_SHA "devel-202311212148Z"
|
||||
|
|
|
@ -511,15 +511,12 @@ void TrackManager::setTrackPower(TRACK_MODE trackmodeToMatch, POWERMODE powermod
|
|||
void TrackManager::setTrackPower(POWERMODE powermode, byte t) {
|
||||
MotorDriver *driver=track[t];
|
||||
TRACK_MODE trackmode = driver->getMode();
|
||||
if (trackmode & TRACK_MODE_NONE) {
|
||||
driver->setBrake(true); // Track is unused. Brake is good to have.
|
||||
powermode = POWERMODE::OFF; // Track is unused. Force it to OFF
|
||||
} else if (trackmode & TRACK_MODE_DC) { // includes inverted DC (called DCX)
|
||||
if (trackmode & TRACK_MODE_DC) {
|
||||
if (powermode == POWERMODE::ON) {
|
||||
driver->setBrake(true); // DC starts with brake on
|
||||
applyDCSpeed(t); // speed match DCC throttles
|
||||
}
|
||||
} else /* MAIN PROG EXT BOOST */ {
|
||||
} else {
|
||||
if (powermode == POWERMODE::ON) {
|
||||
// toggle brake before turning power on - resets overcurrent error
|
||||
// on the Pololu board if brake is wired to ^D2.
|
||||
|
|
Loading…
Reference in New Issue
Block a user