From 9e6d0ea6109157941179c67eed063b8ab68ef99b Mon Sep 17 00:00:00 2001 From: Marcio T Date: Sun, 22 Oct 2023 16:22:16 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20FTDI=20Eve=20Touch=20UI=20?= =?UTF-8?q?meshGetter,=20etc.=20(#26342)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/inc/Conditionals_adv.h | 2 +- .../ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp | 2 +- .../ftdi_eve_touch_ui/generic/filament_runout_screen.cpp | 4 +++- .../extui/ftdi_eve_touch_ui/generic/language_menu.cpp | 2 ++ buildroot/tests/FYSETC_S6 | 9 ++++++--- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 5e3f86919a..baba95267e 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1230,7 +1230,7 @@ #define _HAS_1(N) (defined(MAIN_MENU_ITEM_##N##_DESC) && defined(MAIN_MENU_ITEM_##N##_GCODE)) #define HAS_USER_ITEM(V...) DO(HAS,||,V) #else - #define HAS_USER_ITEM(N) 0 + #define HAS_USER_ITEM(...) 0 #endif /** diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp index c42d83420f..6030fd02a0 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp @@ -53,7 +53,7 @@ constexpr static float gaugeThickness = 0.25; #endif static float meshGetter(uint8_t x, uint8_t y, void*) { - return ExtUI::getMeshPoint(xy_uint8_t(x, y)); + return ExtUI::getMeshPoint(xy_uint8_t({ x, y })); } void BedMeshViewScreen::onEntry() { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp index 68948b0c5e..0569b90032 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp @@ -46,7 +46,9 @@ void FilamentRunoutScreen::onRedraw(draw_mode_t what) { bool FilamentRunoutScreen::onTouchHeld(uint8_t tag) { using namespace ExtUI; - const float increment = getIncrement(); + #if HAS_FILAMENT_RUNOUT_DISTANCE + const float increment = getIncrement(); + #endif switch (tag) { case 2: setFilamentRunoutEnabled(!getFilamentRunoutEnabled()); break; #if HAS_FILAMENT_RUNOUT_DISTANCE diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp index 5d797f44df..15252941d7 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp @@ -53,6 +53,8 @@ void LanguageMenu::onRedraw(draw_mode_t) { #endif } +extern uint8_t ftdi_language; + bool LanguageMenu::onTouchEnd(uint8_t tag) { if (tag > 0 && tag <= NUM_LANGUAGES) { diff --git a/buildroot/tests/FYSETC_S6 b/buildroot/tests/FYSETC_S6 index 6d67800d77..9043b7b6e3 100755 --- a/buildroot/tests/FYSETC_S6 +++ b/buildroot/tests/FYSETC_S6 @@ -14,11 +14,14 @@ opt_set Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2130 exec_test $1 $2 "FYSETC S6 Example" "$3" # -# Build with the default configurations with FYSETC TFT81050 +# Build with FTDI Eve Touch UI and some features # restore_configs -opt_set MOTHERBOARD BOARD_FYSETC_S6_V2_0 SERIAL_PORT 1 -opt_enable TOUCH_UI_FTDI_EVE LCD_FYSETC_TFT81050 S6_TFT_PINMAP +opt_set MOTHERBOARD BOARD_FYSETC_S6_V2_0 SERIAL_PORT 1 X_DRIVER_TYPE TMC2130 +opt_enable TOUCH_UI_FTDI_EVE LCD_FYSETC_TFT81050 S6_TFT_PINMAP LCD_LANGUAGE_2 SDSUPPORT CUSTOM_MENU_MAIN \ + FIX_MOUNTED_PROBE AUTO_BED_LEVELING_UBL Z_SAFE_HOMING \ + EEPROM_SETTINGS PRINTCOUNTER CALIBRATION_GCODE LIN_ADVANCE \ + FILAMENT_RUNOUT_SENSOR ADVANCED_PAUSE_FEATURE NOZZLE_PARK_FEATURE exec_test $1 $2 "FYSETC S6 2 with LCD FYSETC TFT81050" "$3" # cleanup