1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-30 03:26:13 +01:00

Ensure loop2() doesn't run during initialisation if there's no display.

Prevent loop2 from doing anything when lcdDisplay not set up.  If there's a display configured but not one attached, then the OLED code will set lcdDisplay to null and no display will be configured or used by the loop() function.  However, because of the way the initialisation code works, loop2() is called during initialisation.
This commit is contained in:
Neil McKechnie 2021-03-16 22:02:39 +00:00
parent 25c2f06574
commit 1cc147cc98

View File

@ -72,6 +72,7 @@ void LCDDisplay::loop() {
}
LCDDisplay *LCDDisplay::loop2(bool force) {
if (!lcdDisplay) return NULL;
unsigned long currentMillis = millis();
if (!force) {