mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-04-01 19:20:12 +02:00
sort power output different
This commit is contained in:
parent
d1daf41f12
commit
d9bd1e75f2
@ -280,6 +280,9 @@ void CommandDistributor::broadcastPower() {
|
|||||||
state = '1';
|
state = '1';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state != '2')
|
||||||
|
broadcastReply(COMMAND_TYPE, F("<p%c>\n"),state);
|
||||||
|
|
||||||
// additional info about MAIN, PROG and JOIN
|
// additional info about MAIN, PROG and JOIN
|
||||||
bool main=TrackManager::getMainPower()==POWERMODE::ON;
|
bool main=TrackManager::getMainPower()==POWERMODE::ON;
|
||||||
bool prog=TrackManager::getProgPower()==POWERMODE::ON;
|
bool prog=TrackManager::getProgPower()==POWERMODE::ON;
|
||||||
@ -288,7 +291,7 @@ void CommandDistributor::broadcastPower() {
|
|||||||
const FSH * reason=F("");
|
const FSH * reason=F("");
|
||||||
if (join) {
|
if (join) {
|
||||||
reason = F(" JOIN"); // with space at start so we can append without space
|
reason = F(" JOIN"); // with space at start so we can append without space
|
||||||
broadcastReply(COMMAND_TYPE, F("<p1 %S>\n"),reason);
|
broadcastReply(COMMAND_TYPE, F("<p1%S>\n"),reason);
|
||||||
} else {
|
} else {
|
||||||
if (main) {
|
if (main) {
|
||||||
//reason = F("MAIN");
|
//reason = F("MAIN");
|
||||||
@ -299,9 +302,6 @@ void CommandDistributor::broadcastPower() {
|
|||||||
broadcastReply(COMMAND_TYPE, F("<p1 PROG>\n"));
|
broadcastReply(COMMAND_TYPE, F("<p1 PROG>\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state != '2')
|
|
||||||
broadcastReply(COMMAND_TYPE, F("<p%c>\n"),state);
|
|
||||||
#ifdef CD_HANDLE_RING
|
#ifdef CD_HANDLE_RING
|
||||||
// send '1' if all main are on, otherwise global state (which in that case is '0' or '2')
|
// send '1' if all main are on, otherwise global state (which in that case is '0' or '2')
|
||||||
broadcastReply(WITHROTTLE_TYPE, F("PPA%c\n"), main?'1': state);
|
broadcastReply(WITHROTTLE_TYPE, F("PPA%c\n"), main?'1': state);
|
||||||
|
Loading…
Reference in New Issue
Block a user