Pārlūkot izejas kodu

TFT followup fixes (#19710)

Victor Oliveira 4 gadus atpakaļ
vecāks
revīzija
b7d9b05952

+ 2
- 1
Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp Parādīt failu

@@ -476,7 +476,8 @@ void lv_encoder_pin_init() {
476 476
 
477 477
         #endif
478 478
 
479
-        static uint8_t buttons = newbutton;
479
+        static uint8_t buttons = 0;
480
+        buttons = newbutton;
480 481
         static uint8_t lastEncoderBits;
481 482
 
482 483
         #define encrot0 0

+ 0
- 4
Marlin/src/lcd/tft/touch.cpp Parādīt failu

@@ -295,10 +295,6 @@ bool Touch::get_point(int16_t *x, int16_t *y) {
295 295
   if (is_touched && calibration.orientation != TOUCH_ORIENTATION_NONE) {
296 296
     *x = int16_t((int32_t(*x) * calibration.x) >> 16) + calibration.offset_x;
297 297
     *y = int16_t((int32_t(*y) * calibration.y) >> 16) + calibration.offset_y;
298
-    #if (TFT_ROTATION & TFT_ROTATE_180)
299
-      *x = TFT_WIDTH - *x;
300
-      *y = TFT_HEIGHT - *y;
301
-    #endif
302 298
   }
303 299
   return is_touched;
304 300
 }

+ 5
- 3
Marlin/src/lcd/tft_io/ili9328.h Parādīt failu

@@ -49,9 +49,11 @@
49 49
   #define ILI9328_GATE_SCANCTL1_DATA 0x2700
50 50
 #endif
51 51
 
52
-// #define ILI9328_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9328_ETMOD_AM) | \
53
-//                                   IF_0((TFT_ORIENTATION) & TFT_INVERT_X,    ILI9328_ETMOD_ID1) | \
54
-//                                   IF_0((TFT_ORIENTATION) & TFT_INVERT_Y,    ILI9328_ETMOD_ID0)
52
+/*
53
+#define ILI9328_ETMOD_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9328_ETMOD_AM)  | \
54
+                                  IF_0((TFT_ORIENTATION) & TFT_INVERT_X,    ILI9328_ETMOD_ID1) | \
55
+                                  IF_0((TFT_ORIENTATION) & TFT_INVERT_Y,    ILI9328_ETMOD_ID0)
56
+*/
55 57
 
56 58
 #define ILI9328_ETMOD_ORIENTATION (ILI9328_ETMOD_AM | ILI9328_ETMOD_ID1 | ILI9328_ETMOD_ID0)
57 59
 

+ 5
- 3
Marlin/src/lcd/tft_io/r65105.h Parādīt failu

@@ -51,9 +51,11 @@
51 51
   #define R61505_DRVCTRL_DATA     0x2700
52 52
 #endif
53 53
 
54
-// #define R61505_ETMOD_ORIENTATION  IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, R61505_ETMOD_AM) | \
55
-//                                   IF_0((TFT_ORIENTATION) & TFT_INVERT_X,    R61505_ETMOD_ID0) | \
56
-//                                   IF_0((TFT_ORIENTATION) & TFT_INVERT_Y,    R61505_ETMOD_ID1)
54
+/*
55
+#define R61505_ETMOD_ORIENTATION  IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, R61505_ETMOD_AM)  | \
56
+                                  IF_0((TFT_ORIENTATION) & TFT_INVERT_X,    R61505_ETMOD_ID0) | \
57
+                                  IF_0((TFT_ORIENTATION) & TFT_INVERT_Y,    R61505_ETMOD_ID1)
58
+*/
57 59
 
58 60
 #define R61505_ETMOD_ORIENTATION (R61505_ETMOD_AM | R61505_ETMOD_ID0 | R61505_ETMOD_ID1)
59 61
 

Notiek ielāde…
Atcelt
Saglabāt