From dc335041d4e914530bc144c5d16a9d21c53a3054 Mon Sep 17 00:00:00 2001 From: Victor Mateus Oliveira Date: Tue, 10 Nov 2020 00:37:16 -0300 Subject: [PATCH] remove xpt values from pins files of boards that have more that one display --- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 31 +--------------- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 31 +--------------- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 31 +--------------- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 36 ------------------- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 29 --------------- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h | 29 --------------- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 16 --------- 7 files changed, 3 insertions(+), 200 deletions(-) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index f2edaf0ef6..6e718e70a0 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -327,36 +327,7 @@ #define LCD_PINS_ENABLE -1 #define LCD_PINS_RS -1 - // XPT2046 Touch Screen calibration - #if ENABLED(TFT_CLASSIC_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -11245 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 8629 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 685 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -285 - #endif - #elif ENABLED(TFT_480x320_SPI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -17232 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 11196 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 1047 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -358 - #endif - - #define TFT_BUFFER_SIZE 2400 - #endif + #define TFT_BUFFER_SIZE 2400 #elif IS_TFTGLCD_PANEL diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 30f2df89a3..ae96fb5d05 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -268,36 +268,7 @@ #define LCD_PINS_ENABLE -1 #define LCD_PINS_RS -1 - // XPT2046 Touch Screen calibration - #if ENABLED(TFT_CLASSIC_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -11386 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 8684 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 689 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -273 - #endif - #elif ENABLED(TFT_COLOR_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -16741 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 11258 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 1024 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -367 - #endif - - #define TFT_BUFFER_SIZE 2400 - #endif + #define TFT_BUFFER_SIZE 2400 #define BTN_EN1 P3_25 #define BTN_EN2 P3_26 diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index dee915026d..c84e5304b1 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -318,36 +318,7 @@ #define LCD_PINS_ENABLE -1 #define LCD_PINS_RS -1 - // XPT2046 Touch Screen calibration - #if ENABLED(TFT_CLASSIC_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -11386 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 8684 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 689 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -273 - #endif - #elif ENABLED(TFT_COLOR_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -17089 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 11424 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 1044 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -365 - #endif - - #define TFT_BUFFER_SIZE 2400 - #endif + #define TFT_BUFFER_SIZE 2400 #else // !MKS_12864OLED_SSD1306 diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index e0de272d7f..70bede3515 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -324,42 +324,6 @@ #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 #endif -// XPT2046 Touch Screen calibration -#if EITHER(TFT_LVGL_UI_FSMC, TFT_COLOR_UI) - #define TFT_BUFFER_SIZE 14400 - - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X 12218 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y -8814 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X -35 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y 256 - #endif - -#elif ENABLED(TFT_CLASSIC_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X 12149 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y -8746 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X -35 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y 256 - #endif - - #define TFT_MARLINUI_COLOR 0xFFFF // White - #define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow - #define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan -#endif - #if NEED_TOUCH_PINS #define TOUCH_CS_PIN PC2 // SPI2_NSS #define TOUCH_SCK_PIN PB13 // SPI2_SCK diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index c98d532e34..b1f41f9fa7 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -282,35 +282,6 @@ #define TFT_BUFFER_SIZE 14400 #endif -// XPT2046 Touch Screen calibration -#if EITHER(HAS_TFT_LVGL_UI, TFT_480x320_SPI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -17253 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 11579 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 514 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -24 - #endif -#elif HAS_SPI_GRAPHICAL_TFT - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -11386 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 8684 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 339 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -18 - #endif -#endif - #if HAS_WIRED_LCD && !HAS_SPI_TFT // NON TFT Displays diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h index 77fc7e8912..760f27060e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h @@ -202,35 +202,6 @@ #define TFT_BUFFER_SIZE 14400 #endif -// XPT2046 Touch Screen calibration -#if ANY(HAS_TFT_LVGL_UI_FSMC, TFT_COLOR_UI, TFT_CLASSIC_UI) && ENABLED(TFT_RES_480x320) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X 17880 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y -12234 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X -45 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y 349 - #endif -#elif EITHER(TFT_COLOR_UI, TFT_CLASSIC_UI) && ENABLED(TFT_RES_320x240) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -12246 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 9453 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 360 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -22 - #endif -#endif - #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x1000000 // 16MB diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 07a04b413d..8b41296971 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -285,22 +285,6 @@ #define TFT_BUFFER_SIZE 14400 #endif -// XPT2046 Touch Screen calibration -#if ANY(TFT_LVGL_UI, TFT_COLOR_UI, TFT_CLASSIC_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -17253 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 11579 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 514 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -24 - #endif -#endif - #if HAS_WIRED_LCD && !HAS_SPI_TFT // NON TFT Displays