diff --git a/EXRAIL2.cpp b/EXRAIL2.cpp index ecd8e0a..633421d 100644 --- a/EXRAIL2.cpp +++ b/EXRAIL2.cpp @@ -808,12 +808,6 @@ void RMFT2::loop2() { DCCWaveform::setJoin(false); CommandDistributor::broadcastPower(); break; - - case OPCODE_POWERON: - DCCWaveform::mainTrack.setPowerMode(POWERMODE::ON); - DCC::setProgTrackSyncMain(false); - CommandDistributor::broadcastPower(); - break; case OPCODE_UNJOIN: DCCWaveform::setJoin(false); diff --git a/WiThrottle.cpp b/WiThrottle.cpp index 22a6f98..1ac93f6 100644 --- a/WiThrottle.cpp +++ b/WiThrottle.cpp @@ -542,8 +542,8 @@ void WiThrottle::getLocoCallback(int16_t locoid) { char addcmd[20]={'M',stashThrottleChar,'+', addrchar}; itoa(locoid,addcmd+4,10); stashInstance->multithrottle(stashStream, (byte *)addcmd); - DCCWaveform::progTrack.setPowerMode(POWERMODE::ON); - DCC::setProgTrackSyncMain(true); // <1 JOIN> so we can drive loco away + TrackManager::setMainPower(POWERMODE::ON); + DCCWaveform::setJoin(true); // <1 JOIN> so we can drive loco away stashStream->commit(); CommandDistributor::broadcastPower();