Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new LCD '@' message for JMRI Virtual LCD #366

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions StringFormatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ void StringFormatter::diag( const FSH* input...) {
void StringFormatter::lcd(byte row, const FSH* input...) {
va_list args;

// Issue the LCD as a diag first
send(&USB_SERIAL,F("<* LCD%d:"),row);
// Copy to serial client for display 0 <@ display# line# "message">
send(&USB_SERIAL,F("<@ 0 %d \""),row);
va_start(args, input);
send2(&USB_SERIAL,input,args);
send(&USB_SERIAL,F(" *>\n"));
send(&USB_SERIAL,F("\">\n"));

DisplayInterface::setRow(row);
va_start(args, input);
send2(DisplayInterface::getDisplayHandler(),input,args);
Expand All @@ -53,6 +53,12 @@ void StringFormatter::lcd(byte row, const FSH* input...) {
void StringFormatter::lcd2(uint8_t display, byte row, const FSH* input...) {
va_list args;

// Copy to serial client <@ display# line# "message">
send(&USB_SERIAL,F("<@ %d %d \""),display,row);
va_start(args, input);
send2(&USB_SERIAL,input,args);
send(&USB_SERIAL,F("\">\n"));

DisplayInterface::setRow(display, row);
va_start(args, input);
send2(DisplayInterface::getDisplayHandler(),input,args);
Expand Down