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

new config options

For Display

Shows IP and Port in same Line: PRINT_IP_PORT_SINGLE_LINE

Shows FastClock readable: FASTCLOCK_READABLE
This commit is contained in:
FranziHH 2023-09-03 16:09:26 +02:00
parent 4bdc4b7079
commit 7b5e2b41da
3 changed files with 30 additions and 3 deletions

View File

@ -181,7 +181,20 @@ void CommandDistributor::setClockTime(int16_t clocktime, int8_t clockrate, byte
case 1:
if (clocktime != lastclocktime){
// CAH. DIAG removed because LCD does it anyway.
LCD(6,F("Clk Time:%d Sp %d"), clocktime, clockrate);
#ifndef FASTCLOCK_READABLE
LCD(6,F("Clk Time: %d Sp %d"), clocktime, clockrate);
#else
// Make Time readable
int hours = clocktime / 60;
int minutes = clocktime - (hours * 60);
int hoursH = hours / 10;
int hoursL = hours - (hoursH * 10);
int minutesH = minutes / 10;
int minutesL = minutes - (minutesH * 10);
LCD(6,F("Clk Time: %d%d:%d%d Sp %d"), hoursH, hoursL, minutesH, minutesL, clockrate);
#endif
// look for an event for this time
RMFT2::clockEvent(clocktime,1);
// Now tell everyone else what the time is.

View File

@ -347,11 +347,17 @@ wifiSerialState WifiInterface::setup2(const FSH* SSid, const FSH* password,
}
ipString[ipLen]=ipChar;
}
LCD(4,F("%s"),ipString); // There is not enough room on some LCDs to put a title to this
#ifndef PRINT_IP_PORT_SINGLE_LINE
LCD(4,F("%s"),ipString); // There is not enough room on some LCDs to put a title to this
#else
LCD(4,F("%s:%d"),ipString,port); // *** Single IP:Port
#endif
}
// suck up anything after the IP.
if (!checkForOK(1000, true, false)) return WIFI_DISCONNECTED;
LCD(5,F("PORT=%d"),port);
#ifndef PRINT_IP_PORT_SINGLE_LINE
LCD(5,F("PORT=%d"),port);
#endif
return WIFI_CONNECTED;
}

View File

@ -167,6 +167,9 @@ The configuration file for DCC-EX Command Station
// * #define SCROLLMODE 2 is by row (move up 1 row at a time).
#define SCROLLMODE 1
// Shows IP and Port on Display in a single line
// #define PRINT_IP_PORT_SINGLE_LINE
/////////////////////////////////////////////////////////////////////////////////////
// DISABLE EEPROM
//
@ -256,6 +259,11 @@ The configuration file for DCC-EX Command Station
//#define FAST_CLOCK_I2C 0x55 // default is 0x55
// -------------------------------------
//
// -------------------------------------
// FastClock in HH:MM on Display
//#define FASTCLOCK_READABLE
// -------------------------------------
//
// BLUETOOTH SERIAL ON ESP32
// On ESP32 you have the possibility to use the builtin BT serial to connect to
// the CS.