Skip to content

Commit

Permalink
Improve Touch Calibration screen (MarlinFirmware#20524)
Browse files Browse the repository at this point in the history
  • Loading branch information
X-Ryl669 authored and zillarob committed Feb 25, 2021
1 parent a0393da commit 9daac98
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdio.h>

//static lv_obj_t *buttonPrint,*buttonTool,*buttonSet;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 9daac98

Please sign in to comment.