mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 18:03:45 +02:00
Sensors show their status at change (as in classic)
This commit is contained in:
@@ -96,6 +96,7 @@ void DCCEXParser::loop(Stream &stream)
|
||||
buffer[bufferLength++] = ch;
|
||||
}
|
||||
}
|
||||
Sensor::checkAll(&stream); // Update and print changes
|
||||
}
|
||||
|
||||
int DCCEXParser::splitValues(int result[MAX_PARAMS], const byte *cmd)
|
||||
@@ -359,11 +360,8 @@ void DCCEXParser::parse(Print *stream, byte *com, bool blocking)
|
||||
return;
|
||||
|
||||
case 'Q': // SENSORS <Q>
|
||||
Sensor::checkAll();
|
||||
for (Sensor *tt = Sensor::firstSensor; tt != NULL; tt = tt->nextSensor)
|
||||
{
|
||||
StringFormatter::send(stream, F("<%c %d>"), tt->active ? 'Q' : 'q', tt->data.snum);
|
||||
}
|
||||
Sensor::checkAll(NULL); // Update, don't print changes
|
||||
Sensor::printAll(stream); // Print all
|
||||
return;
|
||||
|
||||
case 's': // <s>
|
||||
|
Reference in New Issue
Block a user