mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
reorder statements in addTrack
This commit is contained in:
parent
6d382fa0f4
commit
f66f5785f5
|
@ -78,11 +78,11 @@ void TrackManager::Setup(const FSH * shieldname,
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackManager::addTrack(byte t, MotorDriver* driver) {
|
void TrackManager::addTrack(byte t, MotorDriver* driver) {
|
||||||
track[t]=driver;
|
|
||||||
trackMode[t]=TRACK_MODE_OFF;
|
trackMode[t]=TRACK_MODE_OFF;
|
||||||
|
track[t]=driver;
|
||||||
if (driver) {
|
if (driver) {
|
||||||
lastTrack=t;
|
|
||||||
track[t]->setPower(POWERMODE::OFF);
|
track[t]->setPower(POWERMODE::OFF);
|
||||||
|
lastTrack=t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user