Skip to content

Commit 46eb671

Browse files
rhapsodyvLCh-77
authored andcommitted
✨ Classic UI BIQU BX (MarlinFirmware#24387)
1 parent 8055215 commit 46eb671

File tree

5 files changed

+35
-26
lines changed

5 files changed

+35
-26
lines changed

Marlin/src/inc/Conditionals_LCD.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,8 @@
14631463
#elif ENABLED(TFT_RES_1024x600)
14641464
#define TFT_WIDTH 1024
14651465
#define TFT_HEIGHT 600
1466-
#define GRAPHICAL_TFT_UPSCALE 4
1466+
#define GRAPHICAL_TFT_UPSCALE 6
1467+
#define TFT_PIXEL_OFFSET_X 120
14671468
#endif
14681469

14691470
// 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
@@ -2923,8 +2923,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
29232923
#endif
29242924
#endif
29252925

2926-
#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 4)
2927-
#error "GRAPHICAL_TFT_UPSCALE must be 2, 3, or 4."
2926+
#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 6)
2927+
#error "GRAPHICAL_TFT_UPSCALE must be between 2 and 6."
29282928
#endif
29292929

29302930
#if BOTH(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW)

Marlin/src/lcd/dogm/HAL_LCD_com_defines.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
#ifndef U8G_COM_SSD_I2C_HAL
125125
#define U8G_COM_SSD_I2C_HAL u8g_com_null_fn
126126
#endif
127-
#if HAS_FSMC_GRAPHICAL_TFT || HAS_SPI_GRAPHICAL_TFT
127+
#if HAS_FSMC_GRAPHICAL_TFT || HAS_SPI_GRAPHICAL_TFT || HAS_LTDC_GRAPHICAL_TFT
128128
uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
129129
#define U8G_COM_HAL_TFT_FN u8g_com_hal_tft_fn
130130
#else

Marlin/src/lcd/touch/touch_buttons.cpp

+25-20
Original file line numberDiff line numberDiff line change
@@ -68,26 +68,31 @@ uint8_t TouchButtons::read_buttons() {
6868
#ifdef HAS_WIRED_LCD
6969
int16_t x, y;
7070

71-
const bool is_touched = (TERN(TOUCH_SCREEN_CALIBRATION, touch_calibration.calibration.orientation, TOUCH_ORIENTATION) == TOUCH_PORTRAIT ? touchIO.getRawPoint(&y, &x) : touchIO.getRawPoint(&x, &y));
72-
#if HAS_TOUCH_SLEEP
73-
if (is_touched)
74-
wakeUp();
75-
else if (!isSleeping() && ELAPSED(millis(), next_sleep_ms) && ui.on_status_screen())
76-
sleepTimeout();
77-
#endif
78-
if (!is_touched) return 0;
79-
80-
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
81-
const calibrationState state = touch_calibration.get_calibration_state();
82-
if (WITHIN(state, CALIBRATION_TOP_LEFT, CALIBRATION_BOTTOM_RIGHT)) {
83-
if (touch_calibration.handleTouch(x, y)) ui.refresh();
84-
return 0;
85-
}
86-
x = int16_t((int32_t(x) * touch_calibration.calibration.x) >> 16) + touch_calibration.calibration.offset_x;
87-
y = int16_t((int32_t(y) * touch_calibration.calibration.y) >> 16) + touch_calibration.calibration.offset_y;
88-
#else
89-
x = uint16_t((uint32_t(x) * TOUCH_CALIBRATION_X) >> 16) + TOUCH_OFFSET_X;
90-
y = uint16_t((uint32_t(y) * TOUCH_CALIBRATION_Y) >> 16) + TOUCH_OFFSET_Y;
71+
#if ENABLED(TFT_TOUCH_DEVICE_XPT2046)
72+
const bool is_touched = (TERN(TOUCH_SCREEN_CALIBRATION, touch_calibration.calibration.orientation, TOUCH_ORIENTATION) == TOUCH_PORTRAIT ? touchIO.getRawPoint(&y, &x) : touchIO.getRawPoint(&x, &y));
73+
#if HAS_TOUCH_SLEEP
74+
if (is_touched)
75+
wakeUp();
76+
else if (!isSleeping() && ELAPSED(millis(), next_sleep_ms) && ui.on_status_screen())
77+
sleepTimeout();
78+
#endif
79+
if (!is_touched) return 0;
80+
81+
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
82+
const calibrationState state = touch_calibration.get_calibration_state();
83+
if (WITHIN(state, CALIBRATION_TOP_LEFT, CALIBRATION_BOTTOM_RIGHT)) {
84+
if (touch_calibration.handleTouch(x, y)) ui.refresh();
85+
return 0;
86+
}
87+
x = int16_t((int32_t(x) * touch_calibration.calibration.x) >> 16) + touch_calibration.calibration.offset_x;
88+
y = int16_t((int32_t(y) * touch_calibration.calibration.y) >> 16) + touch_calibration.calibration.offset_y;
89+
#else
90+
x = uint16_t((uint32_t(x) * TOUCH_CALIBRATION_X) >> 16) + TOUCH_OFFSET_X;
91+
y = uint16_t((uint32_t(y) * TOUCH_CALIBRATION_Y) >> 16) + TOUCH_OFFSET_Y;
92+
#endif
93+
#elif ENABLED(TFT_TOUCH_DEVICE_GT911)
94+
bool is_touched = (TOUCH_ORIENTATION == TOUCH_PORTRAIT ? touchIO.getPoint(&y, &x) : touchIO.getPoint(&x, &y));
95+
if (!is_touched) return 0;
9196
#endif
9297

9398
// Touch within the button area simulates an encoder button

Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#define MARLIN_EEPROM_SIZE 0x1000 // 4K (24C32)
3434

3535
#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support
36+
//#define SWD_DEBUG // Use pins PA13 and PA14 on STM32H7 for the SWD debugger
3637

3738
//
3839
// Limit Switches
@@ -47,8 +48,10 @@
4748
#define FIL_RUNOUT_PIN PD13
4849
#define FIL_RUNOUT2_PIN PB13
4950

50-
#define LED_PIN PA13
51-
#define BEEPER_PIN PA14
51+
#ifndef SWD_DEBUG
52+
#define LED_PIN PA13
53+
#define BEEPER_PIN PA14
54+
#endif
5255

5356
#define POWER_MONITOR_PIN PB0
5457
#define RPI_POWER_PIN PE5

0 commit comments

Comments
 (0)