mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 13:21:23 +01:00
return false if parseS does not find any sensors
This commit is contained in:
parent
8101e75dae
commit
019001675e
@ -564,6 +564,8 @@ bool DCCEXParser::parseS(Print *stream, int params, int p[])
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 0: // <S> lit sensor states
|
case 0: // <S> lit sensor states
|
||||||
|
if (Sensor::firstSensor == NULL)
|
||||||
|
return false;
|
||||||
for (Sensor *tt = Sensor::firstSensor; tt != NULL; tt = tt->nextSensor)
|
for (Sensor *tt = Sensor::firstSensor; tt != NULL; tt = tt->nextSensor)
|
||||||
{
|
{
|
||||||
StringFormatter::send(stream, F("<Q %d %d %d>"), tt->data.snum, tt->data.pin, tt->data.pullUp);
|
StringFormatter::send(stream, F("<Q %d %d %d>"), tt->data.snum, tt->data.pin, tt->data.pullUp);
|
||||||
|
Loading…
Reference in New Issue
Block a user