mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-27 01:56:14 +01:00
Reduce flash size usage when no LCD is used. -648 Bytes
This commit is contained in:
parent
7e16ec7088
commit
f99aab3254
|
@ -137,7 +137,9 @@ void loop()
|
|||
LCN::loop();
|
||||
#endif
|
||||
|
||||
#ifndef NO_LCD_USED
|
||||
LCDDisplay::loop(); // ignored if LCD not in use
|
||||
#endif
|
||||
|
||||
// Handle/update IO devices.
|
||||
IODevice::loop();
|
||||
|
|
|
@ -27,10 +27,14 @@
|
|||
|
||||
#ifndef LCD_Implementation_h
|
||||
#define LCD_Implementation_h
|
||||
#if !defined(OLED_DRIVER) && !defined(LCD_DRIVER)
|
||||
#include "DisplayInterface.h"
|
||||
#define NO_LCD_USED
|
||||
#else
|
||||
#include "LCDDisplay.h"
|
||||
#include "SSD1306Ascii.h"
|
||||
#include "LiquidCrystal_I2C.h"
|
||||
|
||||
#endif
|
||||
|
||||
// Implement the LCDDisplay shim class as a singleton.
|
||||
// The DisplayInterface class implements a displayy handler with no code (null device);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
Print * StringFormatter::diagSerial=&Serial;
|
||||
#endif
|
||||
|
||||
#include "LCDDisplay.h"
|
||||
#include "LCD_Implementation.h"
|
||||
|
||||
bool Diag::ACK=false;
|
||||
bool Diag::CMD=false;
|
||||
|
@ -47,6 +47,7 @@ void StringFormatter::diag( const FSH* input...) {
|
|||
}
|
||||
|
||||
void StringFormatter::lcd(byte row, const FSH* input...) {
|
||||
#ifndef NO_LCD_USED
|
||||
va_list args;
|
||||
|
||||
// Issue the LCD as a diag first
|
||||
|
@ -59,6 +60,7 @@ void StringFormatter::lcd(byte row, const FSH* input...) {
|
|||
LCDDisplay::lcdDisplay->setRow(row);
|
||||
va_start(args, input);
|
||||
send2(LCDDisplay::lcdDisplay,input,args);
|
||||
#endif
|
||||
}
|
||||
|
||||
void StringFormatter::send(Print * stream, const FSH* input...) {
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <cstdarg>
|
||||
#endif
|
||||
|
||||
#include "LCDDisplay.h"
|
||||
class Diag {
|
||||
public:
|
||||
static bool ACK;
|
||||
|
|
Loading…
Reference in New Issue
Block a user