浏览代码

Fix COLOR_UI without TOUCH_SCREEN_CALIBRATION (#20269)

Victor Oliveira 3 年前
父节点
当前提交
04c4c6004e
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 9 次插入8 次删除
  1. 8
    0
      Marlin/src/lcd/tft_io/tft_io.h
  2. 1
    8
      Marlin/src/lcd/tft_io/touch_calibration.h

+ 8
- 0
Marlin/src/lcd/tft_io/tft_io.h 查看文件

@@ -71,6 +71,14 @@
71 71
 //   #define TFT_COLOR   TFT_COLOR_RGB
72 72
 // #endif
73 73
 
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
+
74 82
 #define SSD1963         0x5761
75 83
 #define ST7735          0x89F0
76 84
 #define ST7789          0x8552

+ 1
- 8
Marlin/src/lcd/tft_io/touch_calibration.h 查看文件

@@ -19,6 +19,7 @@
19 19
 #pragma once
20 20
 
21 21
 #include "../../inc/MarlinConfigPre.h"
22
+#include "tft_io.h"
22 23
 
23 24
 #ifndef TOUCH_SCREEN_CALIBRATION_PRECISION
24 25
   #define TOUCH_SCREEN_CALIBRATION_PRECISION  80
@@ -28,14 +29,6 @@
28 29
   #define TOUCH_SCREEN_HOLD_TO_CALIBRATE_MS   2500
29 30
 #endif
30 31
 
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
-
39 32
 typedef struct __attribute__((__packed__)) {
40 33
   int32_t x, y;
41 34
   int16_t offset_x, offset_y;

正在加载...
取消
保存