From 2049cc89b3de0444f2c100ba90e62e236af593da Mon Sep 17 00:00:00 2001 From: Asbelos Date: Tue, 7 Dec 2021 00:57:08 +0000 Subject: [PATCH] Emit EXRAIL power changes --- RMFT2.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RMFT2.cpp b/RMFT2.cpp index c2a99d3..66e0e64 100644 --- a/RMFT2.cpp +++ b/RMFT2.cpp @@ -24,6 +24,7 @@ #include "WiThrottle.h" #include "DCCEXParser.h" #include "Turnouts.h" +#include "CommandDistributor.h" // Command parsing keywords @@ -340,7 +341,7 @@ void RMFT2::driveLoco(byte speed) { if (diag) DIAG(F("EXRAIL drive %d %d %d"),loco,speed,forward^invert); if (DCCWaveform::mainTrack.getPowerMode()==POWERMODE::OFF) { DCCWaveform::mainTrack.setPowerMode(POWERMODE::ON); - Serial.println(F("")); // tell JMRI + CommandDistributor::broadcastPower(); } DCC::setThrottle(loco,speed, forward^invert); speedo=speed; @@ -497,7 +498,7 @@ void RMFT2::loop2() { DCCWaveform::mainTrack.setPowerMode(POWERMODE::OFF); DCCWaveform::progTrack.setPowerMode(POWERMODE::OFF); DCC::setProgTrackSyncMain(false); - Serial.println(F("")); // Tell JMRI + CommandDistributor::broadcastPower(); break; case OPCODE_RESUME: @@ -598,7 +599,7 @@ void RMFT2::loop2() { DCCWaveform::mainTrack.setPowerMode(POWERMODE::ON); DCCWaveform::progTrack.setPowerMode(POWERMODE::ON); DCC::setProgTrackSyncMain(true); - Serial.println(F("")); // Tell JMRI + CommandDistributor::broadcastPower(); break; case OPCODE_UNJOIN: