mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
fixup power broacast
This commit is contained in:
parent
2049cc89b3
commit
985f0e777c
@ -104,12 +104,14 @@ void CommandDistributor::broadcastPower() {
|
||||
bool main=DCCWaveform::mainTrack.getPowerMode()==POWERMODE::ON;
|
||||
bool prog=DCCWaveform::progTrack.getPowerMode()==POWERMODE::ON;
|
||||
bool join=DCCWaveform::progTrackSyncMain;
|
||||
if (main && prog && join) reason=F("p1 JOIN");
|
||||
else if (main && prog) reason=F("p1");
|
||||
else if (main) reason=F("p1 MAIN");
|
||||
else if (prog) reason=F("p1 PROG");
|
||||
StringFormatter::send(broadcastBufferWriter,F("<%S>\n"),reason);
|
||||
LCD(2,reason);
|
||||
if (main && prog && join) reason=F("1 JOIN");
|
||||
else if (main && prog) reason=F("1");
|
||||
else if (main) reason=F("1 MAIN");
|
||||
else if (prog) reason=F("1 PROG");
|
||||
else reason=F("0");
|
||||
StringFormatter::send(broadcastBufferWriter,
|
||||
F("<p%S>\nPPA%c\n"),reason, main?'1':'0');
|
||||
LCD(2,F("Power %S"),reason);
|
||||
broadcast();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user