Skip to content

Commit 04c4c60

Browse files
authored
Fix COLOR_UI without TOUCH_SCREEN_CALIBRATION (MarlinFirmware#20269)
1 parent 2693e35 commit 04c4c60

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

Marlin/src/lcd/tft_io/tft_io.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@
7171
// #define TFT_COLOR TFT_COLOR_RGB
7272
// #endif
7373

74+
#define TOUCH_ORIENTATION_NONE 0
75+
#define TOUCH_LANDSCAPE 1
76+
#define TOUCH_PORTRAIT 2
77+
78+
#ifndef TOUCH_ORIENTATION
79+
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
80+
#endif
81+
7482
#define SSD1963 0x5761
7583
#define ST7735 0x89F0
7684
#define ST7789 0x8552

Marlin/src/lcd/tft_io/touch_calibration.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#pragma once
2020

2121
#include "../../inc/MarlinConfigPre.h"
22+
#include "tft_io.h"
2223

2324
#ifndef TOUCH_SCREEN_CALIBRATION_PRECISION
2425
#define TOUCH_SCREEN_CALIBRATION_PRECISION 80
@@ -28,14 +29,6 @@
2829
#define TOUCH_SCREEN_HOLD_TO_CALIBRATE_MS 2500
2930
#endif
3031

31-
#define TOUCH_ORIENTATION_NONE 0
32-
#define TOUCH_LANDSCAPE 1
33-
#define TOUCH_PORTRAIT 2
34-
35-
#ifndef TOUCH_ORIENTATION
36-
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
37-
#endif
38-
3932
typedef struct __attribute__((__packed__)) {
4033
int32_t x, y;
4134
int16_t offset_x, offset_y;

0 commit comments

Comments
 (0)