Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix simulation for TFT LCDs #24871

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tests-single-ci:

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
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
.PHONY: tests-single-local
Expand All @@ -38,7 +38,7 @@ tests-single-local-docker:
.PHONY: tests-single-local-docker

tests-all-local:
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& 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
.PHONY: tests-all-local
Expand Down
6 changes: 4 additions & 2 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,7 @@
#endif
#elif ENABLED(TFT_GENERIC)
#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
#endif
#if NONE(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI)
Expand Down Expand Up @@ -1574,6 +1574,8 @@
#elif TFT_HEIGHT == 600
#if ENABLED(TFT_INTERFACE_LTDC)
#define TFT_1024x600_LTDC
#else
#define TFT_1024x600_SIM // "Simulation" - for testing purposes only
#endif
#endif
#endif
Expand All @@ -1584,7 +1586,7 @@
#define HAS_UI_480x320 1
#elif EITHER(TFT_480x272, TFT_480x272_SPI)
#define HAS_UI_480x272 1
#elif defined(TFT_1024x600_LTDC)
#elif EITHER(TFT_1024x600_LTDC, TFT_1024x600_SIM)
#define HAS_UI_1024x600 1
#endif
#if ANY(HAS_UI_320x240, HAS_UI_480x320, HAS_UI_480x272)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/marlinui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,7 @@ void MarlinUI::init() {
);
}

#if LCD_WITH_BLINK
#if LCD_WITH_BLINK && DISABLED(HAS_GRAPHICAL_TFT)
typedef void (*PrintProgress_t)();
void MarlinUI::rotate_progress() { // Renew and redraw all enabled progress strings
const PrintProgress_t progFunc[] = {
Expand Down
13 changes: 13 additions & 0 deletions Marlin/src/pins/linux/pins_RAMPS_LINUX.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,19 @@
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y 1
#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

Expand Down