mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
Emit EXRAIL power changes
This commit is contained in:
parent
18695888dd
commit
2049cc89b3
@ -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("<p1>")); // 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("<p0>")); // 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("<p1 JOIN>")); // Tell JMRI
|
||||
CommandDistributor::broadcastPower();
|
||||
break;
|
||||
|
||||
case OPCODE_UNJOIN:
|
||||
|
Loading…
Reference in New Issue
Block a user