From 258113c580f3fedc31d68c36a9f0419d6135eb14 Mon Sep 17 00:00:00 2001 From: Asbelos Date: Wed, 18 Nov 2020 12:34:02 +0000 Subject: [PATCH] Fix T commands (#59) Fix response giving 128 instead of 1 for active status --- DCCEXParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index ec6f049..2b90136 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -515,7 +515,7 @@ bool DCCEXParser::parseT(Print *stream, int params, int p[]) for (Turnout *tt = Turnout::firstTurnout; tt != NULL; tt = tt->nextTurnout) { gotOne = true; - StringFormatter::send(stream, F(""), tt->data.id, tt->data.tStatus & STATUS_ACTIVE); + StringFormatter::send(stream, F(""), tt->data.id, (tt->data.tStatus & STATUS_ACTIVE)!=0); } return gotOne; // will if none found } @@ -532,7 +532,7 @@ bool DCCEXParser::parseT(Print *stream, int params, int p[]) if (!tt) return false; tt->activate(p[1]); - StringFormatter::send(stream, F(""), tt->data.id, tt->data.tStatus & STATUS_ACTIVE); + StringFormatter::send(stream, F(""), tt->data.id, (tt->data.tStatus & STATUS_ACTIVE)!=0); } return true;