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

Compare commits

..

3 Commits

Author SHA1 Message Date
Travis Farmer
5f98d7b22f
Merge 5906735c56 into d46a6f092a 2023-11-19 21:55:47 +00:00
travis-farmer
5906735c56
patching in PR # 366 2023-11-19 16:55:06 -05:00
travis-farmer
1a4fff8924
adding more locos for Giga 2023-11-19 15:27:26 -05:00
2 changed files with 13 additions and 3 deletions

4
DCC.h
View File

@ -43,7 +43,11 @@ const uint16_t LONG_ADDR_MARKER = 0x4000;
// Allocations with memory implications..! // Allocations with memory implications..!
// Base system takes approx 900 bytes + 8 per loco. Turnouts, Sensors etc are dynamically created // Base system takes approx 900 bytes + 8 per loco. Turnouts, Sensors etc are dynamically created
#if defined(HAS_ENOUGH_MEMORY) #if defined(HAS_ENOUGH_MEMORY)
#if defined(ARDUINO_GIGA) // yes giga
const byte MAX_LOCOS = 100;
#else // no giga
const byte MAX_LOCOS = 50; const byte MAX_LOCOS = 50;
#endif // giga
#else #else
const byte MAX_LOCOS = 30; const byte MAX_LOCOS = 30;
#endif #endif

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;
// Issue the LCD as a diag first // Copy to serial client for display 0 <@ display# line# "message">
send(&USB_SERIAL,F("<* LCD%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,6 +53,12 @@ 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">
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); DisplayInterface::setRow(display, row);
va_start(args, input); va_start(args, input);
send2(DisplayInterface::getDisplayHandler(),input,args); send2(DisplayInterface::getDisplayHandler(),input,args);