1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00

Separate out lcd (write to default display) and lcd2 (any display).

This commit is contained in:
Neil McKechnie 2023-02-11 17:04:18 +00:00
parent 8be9d9e0b0
commit 65f7a4917f
5 changed files with 9 additions and 9 deletions

2
DIAG.h
View File

@ -24,5 +24,5 @@
#include "StringFormatter.h"
#define DIAG StringFormatter::diag
#define LCD StringFormatter::lcd
#define LCD2 StringFormatter::lcd
#define LCD2 StringFormatter::lcd2
#endif

View File

@ -307,7 +307,7 @@ const HIGHFLASH int16_t RMFT2::SignalDefinitions[] = {
#define KILLALL OPCODE_KILLALL,0,0,
#define LATCH(sensor_id) OPCODE_LATCH,V(sensor_id),
#define LCD(id,msg) PRINT(msg)
#define LCD2(display,id,msg)
#define LCD2(display,id,msg) PRINT(msg)
#define LCN(msg) PRINT(msg)
#define MOVETT(id,steps,activity) OPCODE_SERVO,V(id),OPCODE_PAD,V(steps),OPCODE_PAD,V(EXTurntable::activity),OPCODE_PAD,V(0),
#define ONACTIVATE(addr,subaddr) OPCODE_ONACTIVATE,V(addr<<2|subaddr),
@ -379,7 +379,7 @@ const HIGHFLASH byte RMFT2::RouteCode[] = {
#undef LCD
#define LCD StringFormatter::lcd
#undef LCD2
#define LCD2 StringFormatter::lcd
#define LCD2 StringFormatter::lcd2
#undef SERIAL
#define SERIAL 0x0
#endif

View File

@ -138,7 +138,7 @@ protected:
}
void _loop(unsigned long) override {
screenUpdate();
//screenUpdate();
}
void screenUpdate() {
@ -177,7 +177,7 @@ protected:
//
/////////////////////////////////////////////////
DisplayInterface* loop2(bool force) override {
//screenUpdate();
screenUpdate();
if (_nextDisplay)
return _nextDisplay->loop2(force); // continue to next display
return NULL;
@ -208,7 +208,8 @@ protected:
_buffer[_rowNo*_numCols+_colNo] = ' ';
_colNo = 0;
// Mark that the buffer has been touched. It will be
// sent to the screen on the next loop entry.
// sent to the screen on the next loop entry, by which time
// the line should have been written to the buffer.
_rowGeneration[_rowNo]++;
} else if (_nextDisplay)

View File

@ -51,14 +51,13 @@ void StringFormatter::lcd(byte row, const FSH* input...) {
send2(LCDDisplay::lcdDisplay,input,args);
}
void StringFormatter::lcd(uint8_t display, byte row, const FSH* input...) {
void StringFormatter::lcd2(uint8_t display, byte row, const FSH* input...) {
va_list args;
if (!LCDDisplay::lcdDisplay) return;
LCDDisplay::lcdDisplay->setRow(display, row);
va_start(args, input);
send2(LCDDisplay::lcdDisplay,input,args);
va_end(args);
}
void StringFormatter::send(Print * stream, const FSH* input...) {

View File

@ -46,7 +46,7 @@ class StringFormatter
// DIAG support
static void diag( const FSH* input...);
static void lcd(byte row, const FSH* input...);
static void lcd(uint8_t display, byte row, const FSH* input...);
static void lcd2(uint8_t display, byte row, const FSH* input...);
static void printEscapes(char * input);
static void printEscape( char c);