Closed alex-code closed 1 year ago
I'd rather implement commands like
status power
status cabs
status ...
as extension to <s>
Harald.
So something a bit like?
// DCCEXParser::parseOne
case 's': // <s>
parseLowerS(stream, params, p);
return;
// ...
void parseLowerS(Print *stream, int16_t params, int16_t p[]) {
switch (p[0]) {
case 'T':
Turnout::printAll(stream);
return;
case 'O':
Output::printAll(stream);
return;
case 'S':
Sensor::printAll(stream);
return;
}
}
Yes, with <s X>
you get detail X and with <s>
only you get all of it.
At least an idea. Sounds useful?
Harald.
PS: I will never learn to quote <
in this markdown
Allow a throttle to request the current track power status. The
<*>
command will runCommandDistributor::broadcastPower();
.@DCC-EX/developers Is the overhead of
CommandDistributor::broadcastPower();
worth breaking out the code a bit more so only the requester receives the result instead of a broadcast?