mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +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:
parent
25c2f06574
commit
1cc147cc98
|
@ -72,6 +72,7 @@ void LCDDisplay::loop() {
|
|||
}
|
||||
|
||||
LCDDisplay *LCDDisplay::loop2(bool force) {
|
||||
if (!lcdDisplay) return NULL;
|
||||
unsigned long currentMillis = millis();
|
||||
|
||||
if (!force) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user