🩹 Fix TFT LCD in Simulation (#24871)

This commit is contained in:
mjbogusz 2022-10-15 01:59:31 +02:00 committed by Scott Lahteine
parent a4d58e8876
commit f39f4d0288
4 changed files with 20 additions and 5 deletions

View File

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

View File

@ -1496,7 +1496,7 @@
#endif #endif
#elif ENABLED(TFT_GENERIC) #elif ENABLED(TFT_GENERIC)
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
#if NONE(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320) #if NONE(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320, TFT_RES_1024x600)
#define TFT_RES_320x240 #define TFT_RES_320x240
#endif #endif
#if NONE(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI) #if NONE(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI)
@ -1574,6 +1574,8 @@
#elif TFT_HEIGHT == 600 #elif TFT_HEIGHT == 600
#if ENABLED(TFT_INTERFACE_LTDC) #if ENABLED(TFT_INTERFACE_LTDC)
#define TFT_1024x600_LTDC #define TFT_1024x600_LTDC
#else
#define TFT_1024x600_SIM // "Simulation" - for testing purposes only
#endif #endif
#endif #endif
#endif #endif
@ -1584,7 +1586,7 @@
#define HAS_UI_480x320 1 #define HAS_UI_480x320 1
#elif EITHER(TFT_480x272, TFT_480x272_SPI) #elif EITHER(TFT_480x272, TFT_480x272_SPI)
#define HAS_UI_480x272 1 #define HAS_UI_480x272 1
#elif defined(TFT_1024x600_LTDC) #elif EITHER(TFT_1024x600_LTDC, TFT_1024x600_SIM)
#define HAS_UI_1024x600 1 #define HAS_UI_1024x600 1
#endif #endif
#if ANY(HAS_UI_320x240, HAS_UI_480x320, HAS_UI_480x272) #if ANY(HAS_UI_320x240, HAS_UI_480x320, HAS_UI_480x272)

View File

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

View File

@ -450,6 +450,19 @@
#ifndef TOUCH_OFFSET_Y #ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y 1 #define TOUCH_OFFSET_Y 1
#endif #endif
#elif ENABLED(TFT_RES_1024x600)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 65533
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 38399
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 2
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y 1
#endif
#endif #endif
#endif #endif