mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 16:16: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:
parent
4bdc4b7079
commit
7b5e2b41da
|
@ -181,7 +181,20 @@ void CommandDistributor::setClockTime(int16_t clocktime, int8_t clockrate, byte
|
||||||
case 1:
|
case 1:
|
||||||
if (clocktime != lastclocktime){
|
if (clocktime != lastclocktime){
|
||||||
// CAH. DIAG removed because LCD does it anyway.
|
// 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
|
// look for an event for this time
|
||||||
RMFT2::clockEvent(clocktime,1);
|
RMFT2::clockEvent(clocktime,1);
|
||||||
// Now tell everyone else what the time is.
|
// Now tell everyone else what the time is.
|
||||||
|
|
|
@ -347,11 +347,17 @@ wifiSerialState WifiInterface::setup2(const FSH* SSid, const FSH* password,
|
||||||
}
|
}
|
||||||
ipString[ipLen]=ipChar;
|
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.
|
// suck up anything after the IP.
|
||||||
if (!checkForOK(1000, true, false)) return WIFI_DISCONNECTED;
|
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;
|
return WIFI_CONNECTED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 2 is by row (move up 1 row at a time).
|
||||||
#define SCROLLMODE 1
|
#define SCROLLMODE 1
|
||||||
|
|
||||||
|
// Shows IP and Port on Display in a single line
|
||||||
|
// #define PRINT_IP_PORT_SINGLE_LINE
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
// DISABLE EEPROM
|
// DISABLE EEPROM
|
||||||
//
|
//
|
||||||
|
@ -256,6 +259,11 @@ The configuration file for DCC-EX Command Station
|
||||||
//#define FAST_CLOCK_I2C 0x55 // default is 0x55
|
//#define FAST_CLOCK_I2C 0x55 // default is 0x55
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
//
|
//
|
||||||
|
// -------------------------------------
|
||||||
|
// FastClock in HH:MM on Display
|
||||||
|
//#define FASTCLOCK_READABLE
|
||||||
|
// -------------------------------------
|
||||||
|
//
|
||||||
// BLUETOOTH SERIAL ON ESP32
|
// BLUETOOTH SERIAL ON ESP32
|
||||||
// On ESP32 you have the possibility to use the builtin BT serial to connect to
|
// On ESP32 you have the possibility to use the builtin BT serial to connect to
|
||||||
// the CS.
|
// the CS.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user