mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 09:53:45 +02:00
Revert to original DCC++ Classic Turnout command polarity.
Revert to <T id 1> command being 'throw' and <T id 0> being 'close', for turnouts.
This commit is contained in:
@@ -679,22 +679,17 @@ bool DCCEXParser::parseT(Print *stream, int16_t params, int16_t p[])
|
||||
{
|
||||
bool state = false;
|
||||
switch (p[1]) {
|
||||
// By default turnout command uses 0=throw, 1=close,
|
||||
// but legacy DCC++ behaviour is 1=throw, 0=close.
|
||||
// Turnout messages use 1=throw, 0=close.
|
||||
case 0:
|
||||
state = Turnout::useClassicTurnoutCommands;
|
||||
break;
|
||||
case 1:
|
||||
state = !Turnout::useClassicTurnoutCommands;
|
||||
break;
|
||||
case HASH_KEYWORD_C:
|
||||
state = true;
|
||||
break;
|
||||
case 1:
|
||||
case HASH_KEYWORD_T:
|
||||
state= false;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
return false; // Invalid parameter
|
||||
}
|
||||
if (!Turnout::setClosed(p[0], state)) return false;
|
||||
|
||||
|
Reference in New Issue
Block a user