mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 13:21:23 +01:00
Report Turnout configuration in old and new formats.
JMRI currently isn't aware of the newer types of turnout in DCC++EX, so when it receives the definitions of turnouts it barfs on them. It still knows a turnout exists, but isn't able to display its full configuration. For DCC Accessory turnouts, the configuration message has changed so that it includes the DCC string (to distinguish them from other types of turnout). To enable current and older versions of JMRI to continue working with DCC turnouts, CS now reports the old and new formats, i.e. <T id addr subaddr state> and <T id DCC addr subadd state>. It currently accepts the first one and ignores the second one, but in the fullness of time it might accept the second one too.
This commit is contained in:
parent
482f4b1c79
commit
133c65bc42
@ -344,6 +344,10 @@ public:
|
|||||||
StringFormatter::send(stream, F("<H %d DCC %d %d %d>\n"), _turnoutData.id,
|
StringFormatter::send(stream, F("<H %d DCC %d %d %d>\n"), _turnoutData.id,
|
||||||
(((_dccTurnoutData.address-1) >> 2)+1), ((_dccTurnoutData.address-1) & 3),
|
(((_dccTurnoutData.address-1) >> 2)+1), ((_dccTurnoutData.address-1) & 3),
|
||||||
_turnoutData.closed ^ useLegacyTurnoutBehaviour);
|
_turnoutData.closed ^ useLegacyTurnoutBehaviour);
|
||||||
|
// Also report using classic DCC++ syntax for DCC accessory turnouts
|
||||||
|
StringFormatter::send(stream, F("<H %d %d %d %d>\n"), _turnoutData.id,
|
||||||
|
(((_dccTurnoutData.address-1) >> 2)+1), ((_dccTurnoutData.address-1) & 3),
|
||||||
|
_turnoutData.closed ^ useLegacyTurnoutBehaviour);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load a DCC turnout definition from EEPROM. The common Turnout data has already been read at this point.
|
// Load a DCC turnout definition from EEPROM. The common Turnout data has already been read at this point.
|
||||||
|
Loading…
Reference in New Issue
Block a user