diff --git a/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino b/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino index b956ac6cc..05bc7db16 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino @@ -1838,21 +1838,14 @@ void DisplayLocalSensor(void) * Public \*********************************************************************************************/ -void DisplayInitDriver(void) { - uint8_t devices_present = TasmotaGlobal.devices_present; // Save devices_present - TasmotaGlobal.devices_present++; - if (!PinUsed(GPIO_BACKLIGHT)) { - if (TasmotaGlobal.light_type && (4 == Settings->display_model)) { - TasmotaGlobal.devices_present--; // Assume PWM channel is used for backlight - } - } - disp_device = TasmotaGlobal.devices_present; // Set display device - +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(); // Not allowed here. Way too early in initi sequence. IE power state has not even been set at this point in time #ifdef USE_MULTI_DISPLAY Set_display(0); @@ -1881,7 +1874,6 @@ void DisplayInitDriver(void) { for (uint8_t count = 0; count < NUM_GRAPHS; count++) { graph[count] = 0; } #endif -/* TasmotaGlobal.devices_present++; if (!PinUsed(GPIO_BACKLIGHT)) { if (TasmotaGlobal.light_type && (4 == Settings->display_model)) { @@ -1889,16 +1881,12 @@ void DisplayInitDriver(void) { } } disp_device = TasmotaGlobal.devices_present; -*/ #ifndef USE_DISPLAY_MODES1TO5 Settings->display_mode = 0; #else DisplayLogBufferInit(); #endif // USE_DISPLAY_MODES1TO5 - } else { - TasmotaGlobal.devices_present = devices_present; // Restore devices_present - disp_device = 0; } } @@ -2021,6 +2009,7 @@ void ApplyDisplayDimmer(void) { // still call Berry virtual display in case it is not managed entirely by renderer Xdsp18(FUNC_DISPLAY_DIM); #endif // USE_BERRY + } else { XdspCall(FUNC_DISPLAY_DIM); } diff --git a/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino b/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino index c3154cd60..68dd09af1 100644 --- a/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino +++ b/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino @@ -436,7 +436,7 @@ int8_t cs; Settings->display_width = renderer->width(); Settings->display_height = renderer->height(); - ApplyDisplayDimmer(); +// ApplyDisplayDimmer(); // Not allowed here. Way too early in initi sequence. IE power state has not even been set at this point in time #ifdef SHOW_SPLASH if (!Settings->flag5.display_no_splash) {