Skip to content

Commit 4769d75

Browse files
thisiskeithbAndy-Big
authored andcommittedJul 26, 2022
📺 Fix TFT Classic UI non-Touchscreen 1024x600 (MarlinFirmware#24541)
1 parent 13e429a commit 4769d75

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
@@ -1469,8 +1469,13 @@
14691469
#elif ENABLED(TFT_RES_1024x600)
14701470
#define TFT_WIDTH 1024
14711471
#define TFT_HEIGHT 600
1472-
#define GRAPHICAL_TFT_UPSCALE 6
1473-
#define TFT_PIXEL_OFFSET_X 120
1472+
#if ENABLED(TOUCH_SCREEN)
1473+
#define GRAPHICAL_TFT_UPSCALE 6
1474+
#define TFT_PIXEL_OFFSET_X 120
1475+
#else
1476+
#define GRAPHICAL_TFT_UPSCALE 8
1477+
#define TFT_PIXEL_OFFSET_X 0
1478+
#endif
14741479
#endif
14751480

14761481
// 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
@@ -2971,8 +2971,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
29712971
#endif
29722972
#endif
29732973

2974-
#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 6)
2975-
#error "GRAPHICAL_TFT_UPSCALE must be between 2 and 6."
2974+
#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 8)
2975+
#error "GRAPHICAL_TFT_UPSCALE must be between 2 and 8."
29762976
#endif
29772977

29782978
#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
@@ -1036,7 +1036,7 @@ static void z_minus() { moveAxis(Z_AXIS, -1); }
10361036
}
10371037
#endif
10381038

1039-
#if HAS_BED_PROBE
1039+
#if BOTH(HAS_BED_PROBE, TOUCH_SCREEN)
10401040
static void z_select() {
10411041
motionAxisState.z_selection *= -1;
10421042
quick_feedback();

0 commit comments

Comments
 (0)
Please sign in to comment.