From 976ac28be58c12c5a16aa18c51162ef87afe0b76 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Mon, 25 Jul 2022 12:02:37 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=BA=20Fix=20TFT=20Classic=20UI=20non-T?= =?UTF-8?q?ouchscreen=201024x600=20(#24541)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_LCD.h | 9 +++++++-- Marlin/src/inc/SanityCheck.h | 4 ++-- Marlin/src/lcd/tft/ui_1024x600.cpp | 2 +- Marlin/src/lcd/tft/ui_320x240.cpp | 2 +- Marlin/src/lcd/tft/ui_480x320.cpp | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 97c55b810c..e41dcdae93 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1386,8 +1386,13 @@ #elif ENABLED(TFT_RES_1024x600) #define TFT_WIDTH 1024 #define TFT_HEIGHT 600 - #define GRAPHICAL_TFT_UPSCALE 6 - #define TFT_PIXEL_OFFSET_X 120 + #if ENABLED(TOUCH_SCREEN) + #define GRAPHICAL_TFT_UPSCALE 6 + #define TFT_PIXEL_OFFSET_X 120 + #else + #define GRAPHICAL_TFT_UPSCALE 8 + #define TFT_PIXEL_OFFSET_X 0 + #endif #endif // FSMC/SPI TFT Panels using standard HAL/tft/tft_(fsmc|spi|ltdc).h diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index d9d9791928..8c9ac338fa 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2841,8 +2841,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #endif -#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 6) - #error "GRAPHICAL_TFT_UPSCALE must be between 2 and 6." +#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 8) + #error "GRAPHICAL_TFT_UPSCALE must be between 2 and 8." #endif #if BOTH(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW) diff --git a/Marlin/src/lcd/tft/ui_1024x600.cpp b/Marlin/src/lcd/tft/ui_1024x600.cpp index ad9f811181..2cce95c8df 100644 --- a/Marlin/src/lcd/tft/ui_1024x600.cpp +++ b/Marlin/src/lcd/tft/ui_1024x600.cpp @@ -791,7 +791,7 @@ static void z_minus() { moveAxis(Z_AXIS, -1); } } #endif -#if HAS_BED_PROBE +#if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) static void z_select() { motionAxisState.z_selection *= -1; quick_feedback(); diff --git a/Marlin/src/lcd/tft/ui_320x240.cpp b/Marlin/src/lcd/tft/ui_320x240.cpp index 56887478f0..19cc4590aa 100644 --- a/Marlin/src/lcd/tft/ui_320x240.cpp +++ b/Marlin/src/lcd/tft/ui_320x240.cpp @@ -771,7 +771,7 @@ static void z_minus() { moveAxis(Z_AXIS, -1); } } #endif -#if HAS_BED_PROBE +#if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) static void z_select() { motionAxisState.z_selection *= -1; quick_feedback(); diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index d4a04d6900..04a121a0e0 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -772,7 +772,7 @@ static void z_minus() { moveAxis(Z_AXIS, -1); } } #endif -#if HAS_BED_PROBE +#if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) static void z_select() { motionAxisState.z_selection *= -1; quick_feedback();