mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
Fix T commands (#59)
Fix <H ..> response giving 128 instead of 1 for active status
This commit is contained in:
parent
9ee5dc1600
commit
258113c580
|
@ -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("<H %d %d>"), tt->data.id, tt->data.tStatus & STATUS_ACTIVE);
|
||||
StringFormatter::send(stream, F("<H %d %d>"), tt->data.id, (tt->data.tStatus & STATUS_ACTIVE)!=0);
|
||||
}
|
||||
return gotOne; // will <X> 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("<H %d %d>"), tt->data.id, tt->data.tStatus & STATUS_ACTIVE);
|
||||
StringFormatter::send(stream, F("<H %d %d>"), tt->data.id, (tt->data.tStatus & STATUS_ACTIVE)!=0);
|
||||
}
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user