mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-30 03:26:13 +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)
|
for (Turnout *tt = Turnout::firstTurnout; tt != NULL; tt = tt->nextTurnout)
|
||||||
{
|
{
|
||||||
gotOne = true;
|
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
|
return gotOne; // will <X> if none found
|
||||||
}
|
}
|
||||||
|
@ -532,7 +532,7 @@ bool DCCEXParser::parseT(Print *stream, int params, int p[])
|
||||||
if (!tt)
|
if (!tt)
|
||||||
return false;
|
return false;
|
||||||
tt->activate(p[1]);
|
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;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user