rename XPT2046_** ==> TOUCH_**

This commit is contained in:
Victor Mateus Oliveira 2020-11-05 23:16:27 -03:00
parent 2f4b85568a
commit 776ff26f6a
17 changed files with 170 additions and 166 deletions

View file

@ -2340,10 +2340,10 @@
#define TOUCH_SCREEN_CALIBRATION #define TOUCH_SCREEN_CALIBRATION
//#define XPT2046_X_CALIBRATION 12316 //#define TOUCH_CALIBRATION_X 12316
//#define XPT2046_Y_CALIBRATION -8981 //#define TOUCH_CALIBRATION_Y -8981
//#define XPT2046_X_OFFSET -43 //#define TOUCH_OFFSET_X -43
//#define XPT2046_Y_OFFSET 257 //#define TOUCH_OFFSET_Y 257
#if ENABLED(TFT_COLOR_UI) #if ENABLED(TFT_COLOR_UI)
//#define SINGLE_TOUCH_NAVIGATION //#define SINGLE_TOUCH_NAVIGATION

View file

@ -3162,17 +3162,17 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
* Touch Buttons * Touch Buttons
*/ */
#if ENABLED(TOUCH_SCREEN) #if ENABLED(TOUCH_SCREEN)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#error "XPT2046_X_CALIBRATION must be defined with TOUCH_SCREEN." #error "TOUCH_CALIBRATION_X must be defined with TOUCH_SCREEN."
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#error "XPT2046_Y_CALIBRATION must be defined with TOUCH_SCREEN." #error "TOUCH_CALIBRATION_Y must be defined with TOUCH_SCREEN."
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#error "XPT2046_X_OFFSET must be defined with TOUCH_SCREEN." #error "TOUCH_OFFSET_X must be defined with TOUCH_SCREEN."
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#error "XPT2046_Y_OFFSET must be defined with TOUCH_SCREEN." #error "TOUCH_OFFSET_Y must be defined with TOUCH_SCREEN."
#endif #endif
#endif #endif

View file

@ -241,8 +241,8 @@ static bool get_point(int16_t *x, int16_t *y) {
bool is_touched = touch.getRawPoint(x, y); bool is_touched = touch.getRawPoint(x, y);
if (is_touched) { if (is_touched) {
*x = int16_t((int32_t(*x) * XPT2046_X_CALIBRATION) >> 16) + XPT2046_X_OFFSET; *x = int16_t((int32_t(*x) * TOUCH_CALIBRATION_X) >> 16) + TOUCH_OFFSET_X;
*y = int16_t((int32_t(*y) * XPT2046_Y_CALIBRATION) >> 16) + XPT2046_Y_OFFSET; *y = int16_t((int32_t(*y) * TOUCH_CALIBRATION_Y) >> 16) + TOUCH_OFFSET_Y;
} }
#if (TFT_ROTATION & TFT_ROTATE_180) #if (TFT_ROTATION & TFT_ROTATE_180)

View file

@ -257,8 +257,8 @@ bool Touch::get_point(int16_t *x, int16_t *y) {
} }
#else #else
bool is_touched = (TOUCH_ORIENTATION == TOUCH_PORTRAIT ? io.getRawPoint(y, x) : io.getRawPoint(x, y)); bool is_touched = (TOUCH_ORIENTATION == TOUCH_PORTRAIT ? io.getRawPoint(y, x) : io.getRawPoint(x, y));
*x = uint16_t((uint32_t(*x) * XPT2046_X_CALIBRATION) >> 16) + XPT2046_X_OFFSET; *x = uint16_t((uint32_t(*x) * TOUCH_CALIBRATION_X) >> 16) + TOUCH_OFFSET_X;
*y = uint16_t((uint32_t(*y) * XPT2046_Y_CALIBRATION) >> 16) + XPT2046_Y_OFFSET; *y = uint16_t((uint32_t(*y) * TOUCH_CALIBRATION_Y) >> 16) + TOUCH_OFFSET_Y;
#endif #endif
return is_touched; return is_touched;
} }

View file

@ -48,6 +48,10 @@
#endif #endif
#endif #endif
#ifndef TOUCH_ORIENTATION
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
#endif
#if ENABLED(TOUCH_SCREEN_CALIBRATION) #if ENABLED(TOUCH_SCREEN_CALIBRATION)
typedef struct __attribute__((__packed__)) { typedef struct __attribute__((__packed__)) {

View file

@ -60,8 +60,8 @@ uint8_t TouchButtons::read_buttons() {
x = int16_t((int32_t(x) * touch_calibration.calibration.x) >> 16) + touch_calibration.calibration.offset_x; x = int16_t((int32_t(x) * touch_calibration.calibration.x) >> 16) + touch_calibration.calibration.offset_x;
y = int16_t((int32_t(y) * touch_calibration.calibration.y) >> 16) + touch_calibration.calibration.offset_y; y = int16_t((int32_t(y) * touch_calibration.calibration.y) >> 16) + touch_calibration.calibration.offset_y;
#else #else
x = uint16_t((uint32_t(x) * XPT2046_X_CALIBRATION) >> 16) + XPT2046_X_OFFSET; x = uint16_t((uint32_t(x) * TOUCH_CALIBRATION_X) >> 16) + TOUCH_OFFSET_X;
y = uint16_t((uint32_t(y) * XPT2046_Y_CALIBRATION) >> 16) + XPT2046_Y_OFFSET; y = uint16_t((uint32_t(y) * TOUCH_CALIBRATION_Y) >> 16) + TOUCH_OFFSET_Y;
#endif #endif

View file

@ -329,30 +329,30 @@
// XPT2046 Touch Screen calibration // XPT2046 Touch Screen calibration
#if ENABLED(TFT_CLASSIC_UI) #if ENABLED(TFT_CLASSIC_UI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -11245 #define TOUCH_CALIBRATION_X -11245
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 8629 #define TOUCH_CALIBRATION_Y 8629
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 685 #define TOUCH_OFFSET_X 685
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -285 #define TOUCH_OFFSET_Y -285
#endif #endif
#elif ENABLED(TFT_480x320_SPI) #elif ENABLED(TFT_480x320_SPI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -17232 #define TOUCH_CALIBRATION_X -17232
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 11196 #define TOUCH_CALIBRATION_Y 11196
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 1047 #define TOUCH_OFFSET_X 1047
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -358 #define TOUCH_OFFSET_Y -358
#endif #endif
#define TFT_BUFFER_SIZE 2400 #define TFT_BUFFER_SIZE 2400

View file

@ -270,30 +270,30 @@
// XPT2046 Touch Screen calibration // XPT2046 Touch Screen calibration
#if ENABLED(TFT_CLASSIC_UI) #if ENABLED(TFT_CLASSIC_UI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -11386 #define TOUCH_CALIBRATION_X -11386
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 8684 #define TOUCH_CALIBRATION_Y 8684
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 689 #define TOUCH_OFFSET_X 689
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -273 #define TOUCH_OFFSET_Y -273
#endif #endif
#elif ENABLED(TFT_COLOR_UI) #elif ENABLED(TFT_COLOR_UI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -16741 #define TOUCH_CALIBRATION_X -16741
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 11258 #define TOUCH_CALIBRATION_Y 11258
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 1024 #define TOUCH_OFFSET_X 1024
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -367 #define TOUCH_OFFSET_Y -367
#endif #endif
#define TFT_BUFFER_SIZE 2400 #define TFT_BUFFER_SIZE 2400

View file

@ -320,30 +320,30 @@
// XPT2046 Touch Screen calibration // XPT2046 Touch Screen calibration
#if ENABLED(TFT_CLASSIC_UI) #if ENABLED(TFT_CLASSIC_UI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -11386 #define TOUCH_CALIBRATION_X -11386
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 8684 #define TOUCH_CALIBRATION_Y 8684
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 689 #define TOUCH_OFFSET_X 689
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -273 #define TOUCH_OFFSET_Y -273
#endif #endif
#elif ENABLED(TFT_COLOR_UI) #elif ENABLED(TFT_COLOR_UI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -17089 #define TOUCH_CALIBRATION_X -17089
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 11424 #define TOUCH_CALIBRATION_Y 11424
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 1044 #define TOUCH_OFFSET_X 1044
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -365 #define TOUCH_OFFSET_Y -365
#endif #endif
#define TFT_BUFFER_SIZE 2400 #define TFT_BUFFER_SIZE 2400

View file

@ -158,17 +158,17 @@
// XPT2046 Touch Screen calibration // XPT2046 Touch Screen calibration
#if ANY(TFT_LVGL_UI, TFT_COLOR_UI, TFT_CLASSIC_UI) #if ANY(TFT_LVGL_UI, TFT_COLOR_UI, TFT_CLASSIC_UI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -17181 #define TOUCH_CALIBRATION_X -17181
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 11434 #define TOUCH_CALIBRATION_Y 11434
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 501 #define TOUCH_OFFSET_X 501
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -9 #define TOUCH_OFFSET_Y -9
#endif #endif
#endif #endif

View file

@ -173,17 +173,17 @@
// XPT2046 Touch Screen calibration // XPT2046 Touch Screen calibration
#if ANY(TFT_LVGL_UI, TFT_COLOR_UI, TFT_CLASSIC_UI) #if ANY(TFT_LVGL_UI, TFT_COLOR_UI, TFT_CLASSIC_UI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -17181 #define TOUCH_CALIBRATION_X -17181
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 11434 #define TOUCH_CALIBRATION_Y 11434
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 501 #define TOUCH_OFFSET_X 501
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -9 #define TOUCH_OFFSET_Y -9
#endif #endif
#endif #endif

View file

@ -286,22 +286,22 @@
// MKS Robin TFT v2.0 with ILI9341 // MKS Robin TFT v2.0 with ILI9341
// Read display identification information (0xD3 on ILI9341) // Read display identification information (0xD3 on ILI9341)
//#define XPT2046_X_CALIBRATION 12013 //#define TOUCH_CALIBRATION_X 12013
//#define XPT2046_Y_CALIBRATION -8711 //#define TOUCH_CALIBRATION_Y -8711
//#define XPT2046_X_OFFSET -32 //#define TOUCH_OFFSET_X -32
//#define XPT2046_Y_OFFSET 256 //#define TOUCH_OFFSET_Y 256
// MKS Robin TFT v1.1 with ILI9328 // MKS Robin TFT v1.1 with ILI9328
//#define XPT2046_X_CALIBRATION -11792 //#define TOUCH_CALIBRATION_X -11792
//#define XPT2046_Y_CALIBRATION 8947 //#define TOUCH_CALIBRATION_Y 8947
//#define XPT2046_X_OFFSET 342 //#define TOUCH_OFFSET_X 342
//#define XPT2046_Y_OFFSET -19 //#define TOUCH_OFFSET_Y -19
// MKS Robin TFT v1.1 with R61505 // MKS Robin TFT v1.1 with R61505
//#define XPT2046_X_CALIBRATION 12489 //#define TOUCH_CALIBRATION_X 12489
//#define XPT2046_Y_CALIBRATION 9210 //#define TOUCH_CALIBRATION_Y 9210
//#define XPT2046_X_OFFSET -52 //#define TOUCH_OFFSET_X -52
//#define XPT2046_Y_OFFSET -17 //#define TOUCH_OFFSET_Y -17
// QQS-Pro uses MKS Robin TFT v2.0 // QQS-Pro uses MKS Robin TFT v2.0
@ -328,31 +328,31 @@
#if EITHER(TFT_LVGL_UI_FSMC, TFT_COLOR_UI) #if EITHER(TFT_LVGL_UI_FSMC, TFT_COLOR_UI)
#define TFT_BUFFER_SIZE 14400 #define TFT_BUFFER_SIZE 14400
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION 12218 #define TOUCH_CALIBRATION_X 12218
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION -8814 #define TOUCH_CALIBRATION_Y -8814
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET -35 #define TOUCH_OFFSET_X -35
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET 256 #define TOUCH_OFFSET_Y 256
#endif #endif
#elif ENABLED(TFT_CLASSIC_UI) #elif ENABLED(TFT_CLASSIC_UI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION 12149 #define TOUCH_CALIBRATION_X 12149
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION -8746 #define TOUCH_CALIBRATION_Y -8746
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET -35 #define TOUCH_OFFSET_X -35
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET 256 #define TOUCH_OFFSET_Y 256
#endif #endif
#define TFT_MARLINUI_COLOR 0xFFFF // White #define TFT_MARLINUI_COLOR 0xFFFF // White

View file

@ -284,30 +284,30 @@
// XPT2046 Touch Screen calibration // XPT2046 Touch Screen calibration
#if EITHER(HAS_TFT_LVGL_UI, TFT_480x320_SPI) #if EITHER(HAS_TFT_LVGL_UI, TFT_480x320_SPI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -17253 #define TOUCH_CALIBRATION_X -17253
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 11579 #define TOUCH_CALIBRATION_Y 11579
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 514 #define TOUCH_OFFSET_X 514
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -24 #define TOUCH_OFFSET_Y -24
#endif #endif
#elif HAS_SPI_GRAPHICAL_TFT #elif HAS_SPI_GRAPHICAL_TFT
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -11386 #define TOUCH_CALIBRATION_X -11386
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 8684 #define TOUCH_CALIBRATION_Y 8684
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 339 #define TOUCH_OFFSET_X 339
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -18 #define TOUCH_OFFSET_Y -18
#endif #endif
#endif #endif

View file

@ -171,17 +171,17 @@
#endif #endif
#if ENABLED(TOUCH_SCREEN) #if ENABLED(TOUCH_SCREEN)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION 12033 #define TOUCH_CALIBRATION_X 12033
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION -9047 #define TOUCH_CALIBRATION_Y -9047
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET -30 #define TOUCH_OFFSET_X -30
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET 254 #define TOUCH_OFFSET_Y 254
#endif #endif
#endif #endif

View file

@ -204,30 +204,30 @@
// XPT2046 Touch Screen calibration // XPT2046 Touch Screen calibration
#if ANY(HAS_TFT_LVGL_UI_FSMC, TFT_COLOR_UI, TFT_CLASSIC_UI) && ENABLED(TFT_RES_480x320) #if ANY(HAS_TFT_LVGL_UI_FSMC, TFT_COLOR_UI, TFT_CLASSIC_UI) && ENABLED(TFT_RES_480x320)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION 17880 #define TOUCH_CALIBRATION_X 17880
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION -12234 #define TOUCH_CALIBRATION_Y -12234
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET -45 #define TOUCH_OFFSET_X -45
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET 349 #define TOUCH_OFFSET_Y 349
#endif #endif
#elif EITHER(TFT_COLOR_UI, TFT_CLASSIC_UI) && ENABLED(TFT_RES_320x240) #elif EITHER(TFT_COLOR_UI, TFT_CLASSIC_UI) && ENABLED(TFT_RES_320x240)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -12246 #define TOUCH_CALIBRATION_X -12246
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 9453 #define TOUCH_CALIBRATION_Y 9453
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 360 #define TOUCH_OFFSET_X 360
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -22 #define TOUCH_OFFSET_Y -22
#endif #endif
#endif #endif

View file

@ -287,17 +287,17 @@
// XPT2046 Touch Screen calibration // XPT2046 Touch Screen calibration
#if ANY(TFT_LVGL_UI, TFT_COLOR_UI, TFT_CLASSIC_UI) #if ANY(TFT_LVGL_UI, TFT_COLOR_UI, TFT_CLASSIC_UI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -17253 #define TOUCH_CALIBRATION_X -17253
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 11579 #define TOUCH_CALIBRATION_Y 11579
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 514 #define TOUCH_OFFSET_X 514
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -24 #define TOUCH_OFFSET_Y -24
#endif #endif
#endif #endif

View file

@ -141,17 +141,17 @@
// XPT2046 Touch Screen calibration // XPT2046 Touch Screen calibration
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI)
#ifndef XPT2046_X_CALIBRATION #ifndef TOUCH_CALIBRATION_X
#define XPT2046_X_CALIBRATION -17181 #define TOUCH_CALIBRATION_X -17181
#endif #endif
#ifndef XPT2046_Y_CALIBRATION #ifndef TOUCH_CALIBRATION_Y
#define XPT2046_Y_CALIBRATION 11434 #define TOUCH_CALIBRATION_Y 11434
#endif #endif
#ifndef XPT2046_X_OFFSET #ifndef TOUCH_OFFSET_X
#define XPT2046_X_OFFSET 501 #define TOUCH_OFFSET_X 501
#endif #endif
#ifndef XPT2046_Y_OFFSET #ifndef TOUCH_OFFSET_Y
#define XPT2046_Y_OFFSET -9 #define TOUCH_OFFSET_Y -9
#endif #endif
#endif #endif