touch calibration on startup for marlin ui - classic and color
This commit is contained in:
parent
a9e41e5e81
commit
4fba2dd7e4
3 changed files with 15 additions and 1 deletions
|
|
@ -1299,6 +1299,10 @@ void setup() {
|
|||
SETUP_RUN(password.lock_machine()); // Will not proceed until correct password provided
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_MENU && ENABLED(TOUCH_SCREEN_CALIBRATION) && EITHER(TFT_CLASSIC_UI, TFT_COLOR_UI)
|
||||
ui.check_touch_calibration();
|
||||
#endif
|
||||
|
||||
marlin_state = MF_RUNNING;
|
||||
|
||||
SETUP_LOG("setup() completed.");
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@
|
|||
#include "../sd/cardreader.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
|
||||
#include "tft_io/touch_calibration.h"
|
||||
#endif
|
||||
|
||||
#if EITHER(HAS_LCD_MENU, ULTIPANEL_FEEDMULTIPLY)
|
||||
#define HAS_ENCODER_ACTION 1
|
||||
#endif
|
||||
|
|
@ -313,6 +317,12 @@ public:
|
|||
// LCD implementations
|
||||
static void clear_lcd();
|
||||
|
||||
#if HAS_LCD_MENU && ENABLED(TOUCH_SCREEN_CALIBRATION)
|
||||
static void check_touch_calibration() {
|
||||
if (touch_calibration.need_calibration()) currentScreen = touch_calibration_screen;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
static void media_changed(const uint8_t old_stat, const uint8_t stat);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ XPT2046 touchIO;
|
|||
#include "../tft_io/touch_calibration.h"
|
||||
#endif
|
||||
|
||||
#include "../../lcd/marlinui.h" // For EN_C bit mask
|
||||
#include "../marlinui.h" // For EN_C bit mask
|
||||
|
||||
#define DOGM_AREA_LEFT TFT_PIXEL_OFFSET_X
|
||||
#define DOGM_AREA_TOP TFT_PIXEL_OFFSET_Y
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue