mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 18:03:45 +02:00
Make <s> output turnout state rather than full turnout definition.
<s> command currently prints the current states for outputs and for sensors, but prints the full configuration of turnouts. This change makes the turnout output consistent, i.e. just <H id state> is output for each turnout. The <T> command still outputs the full turnout definition.
This commit is contained in:
@@ -194,9 +194,7 @@
|
||||
// Display, on the specified stream, the current state of the turnout (1 or 0).
|
||||
void Turnout::printState(uint16_t id, Print *stream) {
|
||||
Turnout *tt = get(id);
|
||||
if (!tt)
|
||||
StringFormatter::send(stream, F("<H %d %d>\n"),
|
||||
id, tt->_turnoutData.closed ^ useLegacyTurnoutBehaviour);
|
||||
if (!tt) tt->printState(stream);
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user