1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-24 13:21:23 +01:00

Use X as the questionmark sign in <T 17 X>

This commit is contained in:
Harald Barth 2022-11-05 23:11:54 +01:00
parent a199de6d3e
commit 2b3ba514b0

View File

@ -73,6 +73,7 @@ const int16_t HASH_KEYWORD_A='A';
const int16_t HASH_KEYWORD_C='C'; const int16_t HASH_KEYWORD_C='C';
const int16_t HASH_KEYWORD_R='R'; const int16_t HASH_KEYWORD_R='R';
const int16_t HASH_KEYWORD_T='T'; const int16_t HASH_KEYWORD_T='T';
const int16_t HASH_KEYWORD_X='X';
const int16_t HASH_KEYWORD_LCN = 15137; const int16_t HASH_KEYWORD_LCN = 15137;
const int16_t HASH_KEYWORD_HAL = 10853; const int16_t HASH_KEYWORD_HAL = 10853;
const int16_t HASH_KEYWORD_SHOW = -21309; const int16_t HASH_KEYWORD_SHOW = -21309;
@ -751,17 +752,19 @@ bool DCCEXParser::parseT(Print *stream, int16_t params, int16_t p[])
case HASH_KEYWORD_T: case HASH_KEYWORD_T:
state= false; state= false;
break; break;
default: // any other parameter prints the long status case HASH_KEYWORD_X:
{
Turnout *tt = Turnout::get(p[0]); Turnout *tt = Turnout::get(p[0]);
if (tt) { if (tt) {
tt->print(stream); tt->print(stream);
break; return true;
} }
return false; return false;
} }
default: // Invalid parameter
return false;
}
if (!Turnout::setClosed(p[0], state)) return false; if (!Turnout::setClosed(p[0], state)) return false;
return true; return true;
} }