1
0
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:
Neil McKechnie
2021-08-21 00:25:00 +01:00
parent 133c65bc42
commit d8366f33c8
2 changed files with 6 additions and 4 deletions

View File

@@ -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