calibration reset and enable it for all ui
This commit is contained in:
parent
314fa0ab9b
commit
715502172f
2 changed files with 1 additions and 2 deletions
|
|
@ -1002,7 +1002,6 @@
|
||||||
// This emulated DOGM has 'touch/xpt2046', not 'tft/xpt2046'
|
// This emulated DOGM has 'touch/xpt2046', not 'tft/xpt2046'
|
||||||
#if ENABLED(TOUCH_SCREEN) && !HAS_GRAPHICAL_TFT
|
#if ENABLED(TOUCH_SCREEN) && !HAS_GRAPHICAL_TFT
|
||||||
#undef TOUCH_SCREEN
|
#undef TOUCH_SCREEN
|
||||||
#undef TOUCH_SCREEN_CALIBRATION
|
|
||||||
#if !HAS_TFT_LVGL_UI
|
#if !HAS_TFT_LVGL_UI
|
||||||
#define HAS_TOUCH_XPT2046 1
|
#define HAS_TOUCH_XPT2046 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -356,6 +356,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u
|
||||||
dev->com_fn(u8g, U8G_COM_MSG_INIT, U8G_SPI_CLK_CYCLE_NONE, nullptr);
|
dev->com_fn(u8g, U8G_COM_MSG_INIT, U8G_SPI_CLK_CYCLE_NONE, nullptr);
|
||||||
tftio.Init();
|
tftio.Init();
|
||||||
tftio.InitTFT();
|
tftio.InitTFT();
|
||||||
|
TERN_(TOUCH_SCREEN_CALIBRATION, touch_calibration.calibration_reset());
|
||||||
|
|
||||||
if (preinit) {
|
if (preinit) {
|
||||||
preinit = false;
|
preinit = false;
|
||||||
|
|
@ -470,7 +471,6 @@ uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_p
|
||||||
U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_tft_320x240_upscale_from_128x64_fn, U8G_COM_HAL_TFT_FN);
|
U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_tft_320x240_upscale_from_128x64_fn, U8G_COM_HAL_TFT_FN);
|
||||||
|
|
||||||
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
|
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
|
||||||
|
|
||||||
static void drawCross(uint16_t x, uint16_t y, uint16_t color) {
|
static void drawCross(uint16_t x, uint16_t y, uint16_t color) {
|
||||||
tftio.set_window(x - 15, y, x + 15, y);
|
tftio.set_window(x - 15, y, x + 15, y);
|
||||||
tftio.WriteMultiple(color, 31);
|
tftio.WriteMultiple(color, 31);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue