瀏覽代碼

🩹 Fix TFT LCD in Simulation (#24871)

mjbogusz 2 年之前
父節點
當前提交
e37a23231a
No account linked to committer's email address
共有 4 個文件被更改,包括 20 次插入5 次删除
  1. 2
    2
      Makefile
  2. 4
    2
      Marlin/src/inc/Conditionals_LCD.h
  3. 1
    1
      Marlin/src/lcd/marlinui.cpp
  4. 13
    0
      Marlin/src/pins/linux/pins_RAMPS_LINUX.h

+ 2
- 2
Makefile 查看文件

@@ -27,7 +27,7 @@ tests-single-ci:
27 27
 
28 28
 tests-single-local:
29 29
 	@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi
30
-	export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
30
+	export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
31 31
 	  && export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
32 32
 	  && run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
33 33
 .PHONY: tests-single-local
@@ -38,7 +38,7 @@ tests-single-local-docker:
38 38
 .PHONY: tests-single-local-docker
39 39
 
40 40
 tests-all-local:
41
-	export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
41
+	export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
42 42
 	  && export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
43 43
 	  && for TEST_TARGET in $$(./get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
44 44
 .PHONY: tests-all-local

+ 4
- 2
Marlin/src/inc/Conditionals_LCD.h 查看文件

@@ -1496,7 +1496,7 @@
1496 1496
   #endif
1497 1497
 #elif ENABLED(TFT_GENERIC)
1498 1498
   #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
1499
-  #if NONE(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320)
1499
+  #if NONE(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320, TFT_RES_1024x600)
1500 1500
     #define TFT_RES_320x240
1501 1501
   #endif
1502 1502
   #if NONE(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI)
@@ -1574,6 +1574,8 @@
1574 1574
   #elif TFT_HEIGHT == 600
1575 1575
     #if ENABLED(TFT_INTERFACE_LTDC)
1576 1576
       #define TFT_1024x600_LTDC
1577
+    #else
1578
+      #define TFT_1024x600_SIM  // "Simulation" - for testing purposes only
1577 1579
     #endif
1578 1580
   #endif
1579 1581
 #endif
@@ -1584,7 +1586,7 @@
1584 1586
   #define HAS_UI_480x320 1
1585 1587
 #elif EITHER(TFT_480x272, TFT_480x272_SPI)
1586 1588
   #define HAS_UI_480x272 1
1587
-#elif defined(TFT_1024x600_LTDC)
1589
+#elif EITHER(TFT_1024x600_LTDC, TFT_1024x600_SIM)
1588 1590
   #define HAS_UI_1024x600 1
1589 1591
 #endif
1590 1592
 #if ANY(HAS_UI_320x240, HAS_UI_480x320, HAS_UI_480x272)

+ 1
- 1
Marlin/src/lcd/marlinui.cpp 查看文件

@@ -1726,7 +1726,7 @@ void MarlinUI::init() {
1726 1726
     );
1727 1727
   }
1728 1728
 
1729
-  #if LCD_WITH_BLINK
1729
+  #if LCD_WITH_BLINK && DISABLED(HAS_GRAPHICAL_TFT)
1730 1730
     typedef void (*PrintProgress_t)();
1731 1731
     void MarlinUI::rotate_progress() { // Renew and redraw all enabled progress strings
1732 1732
       const PrintProgress_t progFunc[] = {

+ 13
- 0
Marlin/src/pins/linux/pins_RAMPS_LINUX.h 查看文件

@@ -450,6 +450,19 @@
450 450
       #ifndef TOUCH_OFFSET_Y
451 451
         #define TOUCH_OFFSET_Y                 1
452 452
       #endif
453
+    #elif ENABLED(TFT_RES_1024x600)
454
+      #ifndef TOUCH_CALIBRATION_X
455
+        #define TOUCH_CALIBRATION_X        65533
456
+      #endif
457
+      #ifndef TOUCH_CALIBRATION_Y
458
+        #define TOUCH_CALIBRATION_Y        38399
459
+      #endif
460
+      #ifndef TOUCH_OFFSET_X
461
+        #define TOUCH_OFFSET_X                 2
462
+      #endif
463
+      #ifndef TOUCH_OFFSET_Y
464
+        #define TOUCH_OFFSET_Y                 1
465
+      #endif
453 466
     #endif
454 467
   #endif
455 468
 

Loading…
取消
儲存