mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-06-26 09:25:18 -06:00
🚸 Improve XPT2046 touch, MKS UI calibration (#27892)
This commit is contained in:
parent
348099dabb
commit
c09638f821
3 changed files with 8 additions and 2 deletions
|
@ -49,7 +49,11 @@
|
|||
#define TOUCH_INT_PIN -1
|
||||
#endif
|
||||
|
||||
#define XPT2046_DFR_MODE 0x00
|
||||
#if PIN_EXISTS(TOUCH_INT)
|
||||
#define XPT2046_DFR_MODE 0x00
|
||||
#else
|
||||
#define XPT2046_DFR_MODE 0x01
|
||||
#endif
|
||||
#define XPT2046_SER_MODE 0x04
|
||||
#define XPT2046_CONTROL 0x80
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#if HAS_TFT_LVGL_UI
|
||||
#include "../../lcd/extui/mks_ui/draw_touch_calibration.h"
|
||||
#include "../../lcd/extui/mks_ui/draw_ui.h"
|
||||
#else
|
||||
#include "../../lcd/menu/menu.h"
|
||||
#endif
|
||||
|
@ -38,6 +39,7 @@
|
|||
void GcodeSuite::M995() {
|
||||
|
||||
#if HAS_TFT_LVGL_UI
|
||||
clear_cur_ui();
|
||||
lv_draw_touch_calibration_screen();
|
||||
#else
|
||||
ui.goto_screen(touch_screen_calibration);
|
||||
|
|
|
@ -86,7 +86,7 @@ void lv_update_touch_calibration_screen() {
|
|||
// end calibration
|
||||
str = stage == CALIBRATION_SUCCESS ? GET_TEXT(MSG_CALIBRATION_COMPLETED) : GET_TEXT(MSG_CALIBRATION_FAILED);
|
||||
touch_calibration.calibration_end();
|
||||
lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_SIZE_X * 3 + INTERVAL_H * 4, BTN_SIZE_Y + INTERVAL_W + titleHeight, event_handler, ID_TC_RETURN);
|
||||
lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, 180, BTN_SIZE_Y + INTERVAL_H + titleHeight, event_handler, ID_TC_RETURN);
|
||||
}
|
||||
|
||||
// draw current message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue