1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-24 08:36:14 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
mstevetodd
a72fc8b5c4
Merge 9df9e8c934 into 387ea019bd 2023-11-10 16:57:59 +00:00
mstevetodd
9df9e8c934 support leading/trailing spaces in LCD message text 2023-11-10 11:57:48 -05:00

View File

@ -39,11 +39,11 @@ void StringFormatter::diag( const FSH* input...) {
void StringFormatter::lcd(byte row, const FSH* input...) { void StringFormatter::lcd(byte row, const FSH* input...) {
va_list args; va_list args;
// Copy to serial client for display 0 <@ display# line# message> // Copy to serial client for display 0 <@ display# line# "message">
send(&USB_SERIAL,F("<@ 0 %d "),row); send(&USB_SERIAL,F("<@ 0 %d \""),row);
va_start(args, input); va_start(args, input);
send2(&USB_SERIAL,input,args); send2(&USB_SERIAL,input,args);
send(&USB_SERIAL,F(">\n")); send(&USB_SERIAL,F("\">\n"));
DisplayInterface::setRow(row); DisplayInterface::setRow(row);
va_start(args, input); va_start(args, input);
@ -53,11 +53,11 @@ void StringFormatter::lcd(byte row, const FSH* input...) {
void StringFormatter::lcd2(uint8_t display, byte row, const FSH* input...) { void StringFormatter::lcd2(uint8_t display, byte row, const FSH* input...) {
va_list args; va_list args;
// Copy to serial client <@ display# line# message> // Copy to serial client <@ display# line# "message">
send(&USB_SERIAL,F("<@ %d %d "),display,row); send(&USB_SERIAL,F("<@ %d %d \""),display,row);
va_start(args, input); va_start(args, input);
send2(&USB_SERIAL,input,args); send2(&USB_SERIAL,input,args);
send(&USB_SERIAL,F(">\n")); send(&USB_SERIAL,F("\">\n"));
DisplayInterface::setRow(display, row); DisplayInterface::setRow(display, row);
va_start(args, input); va_start(args, input);