Fix unwanted display interactions

Fix unwanted display interactions when no display is configured
This commit is contained in:
Theo Arends 2021-09-29 16:36:33 +02:00
parent 9b35c54ed1
commit 0b944fddba

View File

@ -1782,6 +1782,10 @@ void DisplayLocalSensor(void)
void DisplayInitDriver(void)
{
XdspCall(FUNC_DISPLAY_INIT_DRIVER);
// AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "Display model %d"), Settings->display_model);
if (Settings->display_model) {
ApplyDisplayDimmer();
#ifdef USE_MULTI_DISPLAY
@ -1811,9 +1815,6 @@ void DisplayInitDriver(void)
for (uint8_t count = 0; count < NUM_GRAPHS; count++) { graph[count] = 0; }
#endif
// AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "Display model %d"), Settings->display_model);
if (Settings->display_model) {
TasmotaGlobal.devices_present++;
if (!PinUsed(GPIO_BACKLIGHT)) {
if (TasmotaGlobal.light_type && (4 == Settings->display_model)) {