Browse Source

🩹 Fix FTDI Eve Touch UI meshGetter, etc. (#26342)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Marcio T 1 year ago
parent
commit
9e6d0ea610

+ 1 - 1
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
 
 /**

+ 1 - 1
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() {

+ 3 - 1
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

+ 2 - 0
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) {

+ 6 - 3
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