Browse Source

🩹 Fix TFT LCD in Simulation (#24871)

mjbogusz 2 years ago
parent
commit
e37a23231a
No account linked to committer's email address

+ 2
- 2
Makefile View File

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

+ 4
- 2
Marlin/src/inc/Conditionals_LCD.h View File

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

+ 1
- 1
Marlin/src/lcd/marlinui.cpp View File

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

+ 13
- 0
Marlin/src/pins/linux/pins_RAMPS_LINUX.h View File

450
       #ifndef TOUCH_OFFSET_Y
450
       #ifndef TOUCH_OFFSET_Y
451
         #define TOUCH_OFFSET_Y                 1
451
         #define TOUCH_OFFSET_Y                 1
452
       #endif
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
     #endif
466
     #endif
454
   #endif
467
   #endif
455
 
468
 

Loading…
Cancel
Save