Skip to content

Commit 05c3c36

Browse files
thisiskeithbLCh-77
authored andcommitted
📺 Fix TFT Classic UI non-Touchscreen 1024x600 (MarlinFirmware#24541)
1 parent 4e46d55 commit 05c3c36

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

Marlin/src/inc/Conditionals_LCD.h

+7-2
Original file line numberDiff line numberDiff line change
@@ -1468,8 +1468,13 @@
14681468
#elif ENABLED(TFT_RES_1024x600)
14691469
#define TFT_WIDTH 1024
14701470
#define TFT_HEIGHT 600
1471-
#define GRAPHICAL_TFT_UPSCALE 6
1472-
#define TFT_PIXEL_OFFSET_X 120
1471+
#if ENABLED(TOUCH_SCREEN)
1472+
#define GRAPHICAL_TFT_UPSCALE 6
1473+
#define TFT_PIXEL_OFFSET_X 120
1474+
#else
1475+
#define GRAPHICAL_TFT_UPSCALE 8
1476+
#define TFT_PIXEL_OFFSET_X 0
1477+
#endif
14731478
#endif
14741479

14751480
// FSMC/SPI TFT Panels using standard HAL/tft/tft_(fsmc|spi|ltdc).h

Marlin/src/inc/SanityCheck.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2975,8 +2975,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
29752975
#endif
29762976
#endif
29772977

2978-
#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 6)
2979-
#error "GRAPHICAL_TFT_UPSCALE must be between 2 and 6."
2978+
#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 8)
2979+
#error "GRAPHICAL_TFT_UPSCALE must be between 2 and 8."
29802980
#endif
29812981

29822982
#if BOTH(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW)

Marlin/src/lcd/tft/ui_1024x600.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ static void z_minus() { moveAxis(Z_AXIS, -1); }
791791
}
792792
#endif
793793

794-
#if HAS_BED_PROBE
794+
#if BOTH(HAS_BED_PROBE, TOUCH_SCREEN)
795795
static void z_select() {
796796
motionAxisState.z_selection *= -1;
797797
quick_feedback();

Marlin/src/lcd/tft/ui_320x240.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ static void z_minus() { moveAxis(Z_AXIS, -1); }
771771
}
772772
#endif
773773

774-
#if HAS_BED_PROBE
774+
#if BOTH(HAS_BED_PROBE, TOUCH_SCREEN)
775775
static void z_select() {
776776
motionAxisState.z_selection *= -1;
777777
quick_feedback();

Marlin/src/lcd/tft/ui_480x320.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ static void z_minus() { moveAxis(Z_AXIS, -1); }
772772
}
773773
#endif
774774

775-
#if HAS_BED_PROBE
775+
#if BOTH(HAS_BED_PROBE, TOUCH_SCREEN)
776776
static void z_select() {
777777
motionAxisState.z_selection *= -1;
778778
quick_feedback();

0 commit comments

Comments
 (0)