From 01756b6b021118e82d109f9c5996846b10caed62 Mon Sep 17 00:00:00 2001 From: Malderin <52313714+Malderin@users.noreply.github.com> Date: Sun, 7 Feb 2021 20:45:14 -0300 Subject: [PATCH] Fix LVGL "more" menu user items (#21004) Co-authored-by: Scott Lahteine --- Marlin/src/inc/Conditionals_adv.h | 7 + .../screens/custom_user_menus.cpp | 3 - Marlin/src/lcd/extui/lib/mks_ui/draw_more.cpp | 2 - .../lcd/extui/lib/mks_ui/tft_Language_en.h | 1 - .../lcd/extui/lib/mks_ui/tft_Language_fr.h | 1 - .../lcd/extui/lib/mks_ui/tft_Language_it.h | 1 - .../lcd/extui/lib/mks_ui/tft_Language_ru.h | 6 - .../lcd/extui/lib/mks_ui/tft_Language_s_cn.h | 1 - .../lcd/extui/lib/mks_ui/tft_Language_sp.h | 1 - .../lcd/extui/lib/mks_ui/tft_Language_t_cn.h | 1 - .../extui/lib/mks_ui/tft_multi_language.cpp | 160 +++++++++++------- Marlin/src/lcd/menu/menu_custom.cpp | 1 - 12 files changed, 103 insertions(+), 82 deletions(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index d6245718f4..c2ba04f0bc 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -516,3 +516,10 @@ (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == (N)) || \ (defined(MMU2_SERIAL_PORT) && MMU2_SERIAL_PORT == (N)) || \ (defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == (N)) + +#if ENABLED(CUSTOM_USER_MENUS) + #define _HAS_1(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N)) + #define HAS_USER_ITEM(V...) DO(HAS,||,V) +#else + #define HAS_USER_ITEM(N) 0 +#endif diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp index 9c7c12e10b..ea175706f7 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp @@ -35,9 +35,6 @@ using namespace Theme; #define _USER_ITEM(N) .tag(_ITEM_TAG(N)).button(USER_ITEM_POS(N), _USER_DESC(N)) #define _USER_ACTION(N) case _ITEM_TAG(N): injectCommands_P(PSTR(_USER_GCODE(N))); TERN_(USER_SCRIPT_RETURN, GOTO_SCREEN(StatusScreen)); break; -#define _HAS_1(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N)) -#define HAS_USER_ITEM(V...) DO(HAS,||,V) - void CustomUserMenus::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { CommandProcessor cmd; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_more.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_more.cpp index 62769ae89f..1eb54d231e 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_more.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_more.cpp @@ -33,8 +33,6 @@ extern lv_group_t * g; static lv_obj_t * scr; -#define HAS_USER_ITEM(N) (ENABLED(CUSTOM_USER_MENUS) && defined(USER_DESC_##N) && defined(USER_GCODE_##N)) - enum { ID_GCODE = 1, #if HAS_USER_ITEM(1) diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h index 5fa1c82027..fd5780e1d8 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h +++ b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h @@ -734,4 +734,3 @@ #define MORE_CUSTOM4_TEXT_EN USER_DESC_4 #define MORE_CUSTOM5_TEXT_EN USER_DESC_5 #define MORE_CUSTOM6_TEXT_EN USER_DESC_6 -#define MORE_CUSTOM7_TEXT_EN USER_DESC_7 diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h index 55416f0254..9440b8b0eb 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h +++ b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h @@ -266,4 +266,3 @@ #define MORE_CUSTOM4_TEXT_FR USER_DESC_4 #define MORE_CUSTOM5_TEXT_FR USER_DESC_5 #define MORE_CUSTOM6_TEXT_FR USER_DESC_6 -#define MORE_CUSTOM7_TEXT_FR USER_DESC_7 diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h index d46cccfeb8..9b88de3df4 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h +++ b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h @@ -263,4 +263,3 @@ #define MORE_CUSTOM4_TEXT_IT USER_DESC_4 #define MORE_CUSTOM5_TEXT_IT USER_DESC_5 #define MORE_CUSTOM6_TEXT_IT USER_DESC_6 -#define MORE_CUSTOM7_TEXT_IT USER_DESC_7 diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h index f5955c38d1..1989eaef1b 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h +++ b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h @@ -261,11 +261,7 @@ #define MORE_CUSTOM4_TEXT_RU USER_DESC_4 #define MORE_CUSTOM5_TEXT_RU USER_DESC_5 #define MORE_CUSTOM6_TEXT_RU USER_DESC_6 -#define MORE_CUSTOM7_TEXT_RU USER_DESC_7 -//Malderin translate -// -// #define EEPROM_STORE_TIPS_RU "Cохранить настройки в EEPROM?" #define EEPROM_READ_TIPS_RU "читать настройки из EEPROM?" #define EEPROM_REVERT_TIPS_RU "Cбросить настройки к значениям по умолчанию?" @@ -365,5 +361,3 @@ #define ENCODER_CONF_TITLE_RU "Hастройки принтера>Hастройки энкодера" #define ENCODER_CONF_TEXT_RU "энкодер используется?" - -//end of Malderin translate diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h index 7ae87b5d3f..cc1a870339 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h +++ b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h @@ -501,4 +501,3 @@ #define MORE_CUSTOM4_TEXT_CN USER_DESC_4 #define MORE_CUSTOM5_TEXT_CN USER_DESC_5 #define MORE_CUSTOM6_TEXT_CN USER_DESC_6 -#define MORE_CUSTOM7_TEXT_CN USER_DESC_7 diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h index 28afe186f1..4654abddee 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h +++ b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h @@ -272,4 +272,3 @@ #define MORE_CUSTOM4_TEXT_SP USER_DESC_4 #define MORE_CUSTOM5_TEXT_SP USER_DESC_5 #define MORE_CUSTOM6_TEXT_SP USER_DESC_6 -#define MORE_CUSTOM7_TEXT_SP USER_DESC_7 diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h index 8d38bc3c9a..8057a3110e 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h +++ b/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h @@ -499,4 +499,3 @@ #define MORE_CUSTOM4_TEXT_T_CN USER_DESC_4 #define MORE_CUSTOM5_TEXT_T_CN USER_DESC_5 #define MORE_CUSTOM6_TEXT_T_CN USER_DESC_6 -#define MORE_CUSTOM7_TEXT_T_CN USER_DESC_7 diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.cpp b/Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.cpp index 1fd17c20f7..5ee184571f 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.cpp @@ -945,13 +945,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_CN; more_menu.gcode = MORE_GCODE_CN; more_menu.entergcode = MORE_ENTER_GCODE_CN; - TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_CN); - TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_CN); - TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_CN); - TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_CN); - TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_CN); - TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_CN); - TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_CN); + #if HAS_USER_ITEM(1) + more_menu.custom1 = MORE_CUSTOM1_TEXT_CN; + #endif + #if HAS_USER_ITEM(2) + more_menu.custom2 = MORE_CUSTOM2_TEXT_CN; + #endif + #if HAS_USER_ITEM(3) + more_menu.custom3 = MORE_CUSTOM3_TEXT_CN; + #endif + #if HAS_USER_ITEM(4) + more_menu.custom4 = MORE_CUSTOM4_TEXT_CN; + #endif + #if HAS_USER_ITEM(5) + more_menu.custom5 = MORE_CUSTOM5_TEXT_CN; + #endif + #if HAS_USER_ITEM(6) + more_menu.custom6 = MORE_CUSTOM6_TEXT_CN; + #endif // WIFI wifi_menu.title = WIFI_TEXT; wifi_menu.cloud = CLOUD_TEXT_CN; @@ -1179,13 +1190,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_T_CN; more_menu.gcode = MORE_GCODE_T_CN; more_menu.entergcode = MORE_ENTER_GCODE_T_CN; - TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_T_CN); - TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_T_CN); - TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_T_CN); - TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_T_CN); - TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_T_CN); - TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_T_CN); - TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_T_CN); + #if HAS_USER_ITEM(1) + more_menu.custom1 = MORE_CUSTOM1_TEXT_CN; + #endif + #if HAS_USER_ITEM(2) + more_menu.custom2 = MORE_CUSTOM2_TEXT_CN; + #endif + #if HAS_USER_ITEM(3) + more_menu.custom3 = MORE_CUSTOM3_TEXT_CN; + #endif + #if HAS_USER_ITEM(4) + more_menu.custom4 = MORE_CUSTOM4_TEXT_CN; + #endif + #if HAS_USER_ITEM(5) + more_menu.custom5 = MORE_CUSTOM5_TEXT_CN; + #endif + #if HAS_USER_ITEM(6) + more_menu.custom6 = MORE_CUSTOM6_TEXT_CN; + #endif // WIFI wifi_menu.title = WIFI_TEXT; wifi_menu.cloud = CLOUD_TEXT_T_CN; @@ -1400,13 +1422,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_EN; more_menu.gcode = MORE_GCODE_EN; more_menu.entergcode = MORE_ENTER_GCODE_EN; - TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_EN); - TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_EN); - TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_EN); - TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_EN); - TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_EN); - TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_EN); - TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_EN); + #if HAS_USER_ITEM(1) + more_menu.custom1 = MORE_CUSTOM1_TEXT_EN; + #endif + #if HAS_USER_ITEM(2) + more_menu.custom2 = MORE_CUSTOM2_TEXT_EN; + #endif + #if HAS_USER_ITEM(3) + more_menu.custom3 = MORE_CUSTOM3_TEXT_EN; + #endif + #if HAS_USER_ITEM(4) + more_menu.custom4 = MORE_CUSTOM4_TEXT_EN; + #endif + #if HAS_USER_ITEM(5) + more_menu.custom5 = MORE_CUSTOM5_TEXT_EN; + #endif + #if HAS_USER_ITEM(6) + more_menu.custom6 = MORE_CUSTOM6_TEXT_EN; + #endif // filesys_menu.title = TITLE_FILESYS_EN; @@ -1622,27 +1655,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_RU; more_menu.gcode = MORE_GCODE_RU; more_menu.entergcode = MORE_ENTER_GCODE_RU; - #if ENABLED(USER_CMD_1_ENABLE) + #if HAS_USER_ITEM(1) more_menu.custom1 = MORE_CUSTOM1_TEXT_RU; #endif - #if ENABLED(USER_CMD_2_ENABLE) + #if HAS_USER_ITEM(2) more_menu.custom2 = MORE_CUSTOM2_TEXT_RU; #endif - #if ENABLED(USER_CMD_3_ENABLE) + #if HAS_USER_ITEM(3) more_menu.custom3 = MORE_CUSTOM3_TEXT_RU; #endif - #if ENABLED(USER_CMD_4_ENABLE) + #if HAS_USER_ITEM(4) more_menu.custom4 = MORE_CUSTOM4_TEXT_RU; #endif - #if ENABLED(USER_CMD_5_ENABLE) + #if HAS_USER_ITEM(5) more_menu.custom5 = MORE_CUSTOM5_TEXT_RU; #endif - #if ENABLED(USER_CMD_6_ENABLE) + #if HAS_USER_ITEM(6) more_menu.custom6 = MORE_CUSTOM6_TEXT_RU; #endif - #if ENABLED(USER_CMD_7_ENABLE) - more_menu.custom7 = MORE_CUSTOM7_TEXT_RU; - #endif // filesys_menu.title = TITLE_FILESYS_RU; filesys_menu.sd_sys = SD_CARD_TEXT_RU; @@ -1954,27 +1984,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_SP; more_menu.gcode = MORE_GCODE_SP; more_menu.entergcode = MORE_ENTER_GCODE_SP; - #if ENABLED(USER_CMD_1_ENABLE) + #if HAS_USER_ITEM(1) more_menu.custom1 = MORE_CUSTOM1_TEXT_SP; #endif - #if ENABLED(USER_CMD_2_ENABLE) + #if HAS_USER_ITEM(2) more_menu.custom2 = MORE_CUSTOM2_TEXT_SP; #endif - #if ENABLED(USER_CMD_3_ENABLE) + #if HAS_USER_ITEM(3) more_menu.custom3 = MORE_CUSTOM3_TEXT_SP; #endif - #if ENABLED(USER_CMD_4_ENABLE) + #if HAS_USER_ITEM(4) more_menu.custom4 = MORE_CUSTOM4_TEXT_SP; #endif - #if ENABLED(USER_CMD_5_ENABLE) + #if HAS_USER_ITEM(5) more_menu.custom5 = MORE_CUSTOM5_TEXT_SP; #endif - #if ENABLED(USER_CMD_6_ENABLE) + #if HAS_USER_ITEM(6) more_menu.custom6 = MORE_CUSTOM6_TEXT_SP; #endif - #if ENABLED(USER_CMD_7_ENABLE) - more_menu.custom7 = MORE_CUSTOM7_TEXT_SP; - #endif // filesys_menu.title = TITLE_FILESYS_SP; filesys_menu.sd_sys = SD_CARD_TEXT_SP; @@ -2191,27 +2218,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_FR; more_menu.gcode = MORE_GCODE_FR; more_menu.entergcode = MORE_ENTER_GCODE_FR; - #if ENABLED(USER_CMD_1_ENABLE) + #if HAS_USER_ITEM(1) more_menu.custom1 = MORE_CUSTOM1_TEXT_FR; #endif - #if ENABLED(USER_CMD_2_ENABLE) + #if HAS_USER_ITEM(2) more_menu.custom2 = MORE_CUSTOM2_TEXT_FR; #endif - #if ENABLED(USER_CMD_3_ENABLE) + #if HAS_USER_ITEM(3) more_menu.custom3 = MORE_CUSTOM3_TEXT_FR; #endif - #if ENABLED(USER_CMD_4_ENABLE) + #if HAS_USER_ITEM(4) more_menu.custom4 = MORE_CUSTOM4_TEXT_FR; #endif - #if ENABLED(USER_CMD_5_ENABLE) + #if HAS_USER_ITEM(5) more_menu.custom5 = MORE_CUSTOM5_TEXT_FR; #endif - #if ENABLED(USER_CMD_6_ENABLE) + #if HAS_USER_ITEM(6) more_menu.custom6 = MORE_CUSTOM6_TEXT_FR; #endif - #if ENABLED(USER_CMD_7_ENABLE) - more_menu.custom7 = MORE_CUSTOM7_TEXT_FR; - #endif // filesys_menu.title = TITLE_FILESYS_FR; filesys_menu.sd_sys = SD_CARD_TEXT_FR; @@ -2429,27 +2453,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_IT; more_menu.gcode = MORE_GCODE_IT; more_menu.entergcode = MORE_ENTER_GCODE_IT; - #if ENABLED(USER_CMD_1_ENABLE) + #if HAS_USER_ITEM(1) more_menu.custom1 = MORE_CUSTOM1_TEXT_IT; #endif - #if ENABLED(USER_CMD_2_ENABLE) + #if HAS_USER_ITEM(2) more_menu.custom2 = MORE_CUSTOM2_TEXT_IT; #endif - #if ENABLED(USER_CMD_3_ENABLE) + #if HAS_USER_ITEM(3) more_menu.custom3 = MORE_CUSTOM3_TEXT_IT; #endif - #if ENABLED(USER_CMD_4_ENABLE) + #if HAS_USER_ITEM(4) more_menu.custom4 = MORE_CUSTOM4_TEXT_IT; #endif - #if ENABLED(USER_CMD_5_ENABLE) + #if HAS_USER_ITEM(5) more_menu.custom5 = MORE_CUSTOM5_TEXT_IT; #endif - #if ENABLED(USER_CMD_6_ENABLE) + #if HAS_USER_ITEM(6) more_menu.custom6 = MORE_CUSTOM6_TEXT_IT; #endif - #if ENABLED(USER_CMD_7_ENABLE) - more_menu.custom7 = MORE_CUSTOM7_TEXT_IT; - #endif // filesys_menu.title = TITLE_FILESYS_IT; filesys_menu.sd_sys = SD_CARD_TEXT_IT; @@ -2667,13 +2688,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_EN; more_menu.gcode = MORE_GCODE_EN; more_menu.entergcode = MORE_ENTER_GCODE_EN; - TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_EN); - TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_EN); - TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_EN); - TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_EN); - TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_EN); - TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_EN); - TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_EN); + #if HAS_USER_ITEM(1) + more_menu.custom1 = MORE_CUSTOM1_TEXT_EN; + #endif + #if HAS_USER_ITEM(2) + more_menu.custom2 = MORE_CUSTOM2_TEXT_EN; + #endif + #if HAS_USER_ITEM(3) + more_menu.custom3 = MORE_CUSTOM3_TEXT_EN; + #endif + #if HAS_USER_ITEM(4) + more_menu.custom4 = MORE_CUSTOM4_TEXT_EN; + #endif + #if HAS_USER_ITEM(5) + more_menu.custom5 = MORE_CUSTOM5_TEXT_EN; + #endif + #if HAS_USER_ITEM(6) + more_menu.custom6 = MORE_CUSTOM6_TEXT_EN; + #endif // filesys_menu.title = TITLE_FILESYS_EN; filesys_menu.sd_sys = SD_CARD_TEXT_EN; diff --git a/Marlin/src/lcd/menu/menu_custom.cpp b/Marlin/src/lcd/menu/menu_custom.cpp index 7c54ec6e26..f3f946883f 100644 --- a/Marlin/src/lcd/menu/menu_custom.cpp +++ b/Marlin/src/lcd/menu/menu_custom.cpp @@ -46,7 +46,6 @@ void _lcd_user_gcode(PGM_P const cmd) { void menu_user() { START_MENU(); BACK_ITEM(MSG_MAIN); - #define HAS_USER_ITEM(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N)) #define USER_ITEM(N) ACTION_ITEM_P(PSTR(USER_DESC_##N), []{ _lcd_user_gcode(PSTR(USER_GCODE_##N _DONE_SCRIPT)); }); #if HAS_USER_ITEM(1) USER_ITEM(1);