From 2b3ba514b0916a0e26b6c42155354d9ef3c40a0e Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sat, 5 Nov 2022 23:11:54 +0100 Subject: [PATCH] Use X as the questionmark sign in --- DCCEXParser.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index ec207cd..8e7cd33 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -73,6 +73,7 @@ const int16_t HASH_KEYWORD_A='A'; const int16_t HASH_KEYWORD_C='C'; const int16_t HASH_KEYWORD_R='R'; 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_HAL = 10853; 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: state= false; break; - default: // any other parameter prints the long status + case HASH_KEYWORD_X: + { Turnout *tt = Turnout::get(p[0]); if (tt) { tt->print(stream); - break; + return true; } return false; + } + default: // Invalid parameter + return false; } if (!Turnout::setClosed(p[0], state)) return false; - - return true; }