From c48f1e491358b68285ea0365c53629d5da731c6f Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Wed, 25 Nov 2020 02:39:49 -0300 Subject: [PATCH] Fix COLOR_UI without TOUCH_SCREEN_CALIBRATION (#20269) --- Marlin/src/lcd/tft_io/tft_io.h | 8 ++++++++ Marlin/src/lcd/tft_io/touch_calibration.h | 9 +-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Marlin/src/lcd/tft_io/tft_io.h b/Marlin/src/lcd/tft_io/tft_io.h index 63d6936ac0b81..50b0ce4463835 100644 --- a/Marlin/src/lcd/tft_io/tft_io.h +++ b/Marlin/src/lcd/tft_io/tft_io.h @@ -71,6 +71,14 @@ // #define TFT_COLOR TFT_COLOR_RGB // #endif +#define TOUCH_ORIENTATION_NONE 0 +#define TOUCH_LANDSCAPE 1 +#define TOUCH_PORTRAIT 2 + +#ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE +#endif + #define SSD1963 0x5761 #define ST7735 0x89F0 #define ST7789 0x8552 diff --git a/Marlin/src/lcd/tft_io/touch_calibration.h b/Marlin/src/lcd/tft_io/touch_calibration.h index 5bebafffd250d..93ed9aa6099a4 100644 --- a/Marlin/src/lcd/tft_io/touch_calibration.h +++ b/Marlin/src/lcd/tft_io/touch_calibration.h @@ -19,6 +19,7 @@ #pragma once #include "../../inc/MarlinConfigPre.h" +#include "tft_io.h" #ifndef TOUCH_SCREEN_CALIBRATION_PRECISION #define TOUCH_SCREEN_CALIBRATION_PRECISION 80 @@ -28,14 +29,6 @@ #define TOUCH_SCREEN_HOLD_TO_CALIBRATE_MS 2500 #endif -#define TOUCH_ORIENTATION_NONE 0 -#define TOUCH_LANDSCAPE 1 -#define TOUCH_PORTRAIT 2 - -#ifndef TOUCH_ORIENTATION - #define TOUCH_ORIENTATION TOUCH_LANDSCAPE -#endif - typedef struct __attribute__((__packed__)) { int32_t x, y; int16_t offset_x, offset_y;