From 9daac9814e52857b3c7cf1ed1d65f8fa520ed8c0 Mon Sep 17 00:00:00 2001 From: X-Ryl669 Date: Tue, 22 Dec 2020 13:17:06 +0100 Subject: [PATCH] Improve Touch Calibration screen (#20524) --- .../src/lcd/extui/lib/mks_ui/draw_ready_print.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp index 60fc3630db54..7a2117d7f5cd 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp @@ -39,6 +39,11 @@ #include "../../../../MarlinCore.h" #include "../../../../module/temperature.h" +#if ENABLED(TOUCH_SCREEN_CALIBRATION) + #include "../../../tft_io/touch_calibration.h" + #include "draw_touch_calibration.h" +#endif + #include //static lv_obj_t *buttonPrint,*buttonTool,*buttonSet; @@ -298,6 +303,14 @@ void lv_draw_ready_print(void) { } #endif } + + #if ENABLED(TOUCH_SCREEN_CALIBRATION) + // If calibration is required, let's trigger it now, handles the case when there is default value in configuration files + if (!touch_calibration.calibration_loaded()) { + lv_clear_ready_print(); + lv_draw_touch_calibration_screen(); + } + #endif } void lv_clear_ready_print() {