1
0
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:
Harald Barth 2022-05-12 20:59:31 +02:00
parent 6d382fa0f4
commit f66f5785f5

View File

@ -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;
} }
} }