1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-29 18:33:44 +02:00

5.2.3 @ and ROUTE_DISABLED

This commit is contained in:
Asbelos
2023-11-17 10:45:36 +00:00
parent 102d6078a7
commit 2ba5adc8b4
7 changed files with 24 additions and 6 deletions

View File

@@ -39,15 +39,18 @@ void StringFormatter::diag( const FSH* input...) {
void StringFormatter::lcd(byte row, const FSH* input...) {
va_list args;
Print * virtualLCD=CommandDistributor::getVirtualLCDSerial(0,row);
// Issue the LCD as a diag first
send(&USB_SERIAL,F("<* LCD%d:"),row);
va_start(args, input);
send2(&USB_SERIAL,input,args);
send(&USB_SERIAL,F(" *>\n"));
// Unless the same serial is asking for the virtual @ respomnse
if (virtualLCD!=&USB_SERIAL) {
send(&USB_SERIAL,F("<* LCD%d:"),row);
va_start(args, input);
send2(&USB_SERIAL,input,args);
send(&USB_SERIAL,F(" *>\n"));
}
// send to virtual LCD collector (if any)
Print * virtualLCD=CommandDistributor::getVirtualLCDSerial(0,row);
if (virtualLCD) {
va_start(args, input);
send2(virtualLCD,input,args);