Browse Source

Fix LVGL "more" menu user items (#21004)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Malderin 3 years ago
parent
commit
01756b6b02
No account linked to committer's email address

+ 7
- 0
Marlin/src/inc/Conditionals_adv.h View File

@@ -516,3 +516,10 @@
516 516
                          (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == (N)) || \
517 517
                          (defined(MMU2_SERIAL_PORT) && MMU2_SERIAL_PORT == (N)) || \
518 518
                          (defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == (N))
519
+
520
+#if ENABLED(CUSTOM_USER_MENUS)
521
+  #define _HAS_1(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N))
522
+  #define HAS_USER_ITEM(V...) DO(HAS,||,V)
523
+#else
524
+  #define HAS_USER_ITEM(N) 0
525
+#endif

+ 0
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp View File

@@ -35,9 +35,6 @@ using namespace Theme;
35 35
 #define _USER_ITEM(N) .tag(_ITEM_TAG(N)).button(USER_ITEM_POS(N), _USER_DESC(N))
36 36
 #define _USER_ACTION(N) case _ITEM_TAG(N): injectCommands_P(PSTR(_USER_GCODE(N))); TERN_(USER_SCRIPT_RETURN, GOTO_SCREEN(StatusScreen)); break;
37 37
 
38
-#define _HAS_1(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N))
39
-#define HAS_USER_ITEM(V...) DO(HAS,||,V)
40
-
41 38
 void CustomUserMenus::onRedraw(draw_mode_t what) {
42 39
   if (what & BACKGROUND) {
43 40
     CommandProcessor cmd;

+ 0
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_more.cpp View File

@@ -33,8 +33,6 @@
33 33
 extern lv_group_t * g;
34 34
 static lv_obj_t * scr;
35 35
 
36
-#define HAS_USER_ITEM(N) (ENABLED(CUSTOM_USER_MENUS) && defined(USER_DESC_##N) && defined(USER_GCODE_##N))
37
-
38 36
 enum {
39 37
   ID_GCODE = 1,
40 38
   #if HAS_USER_ITEM(1)

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h View File

@@ -734,4 +734,3 @@
734 734
 #define MORE_CUSTOM4_TEXT_EN  USER_DESC_4
735 735
 #define MORE_CUSTOM5_TEXT_EN  USER_DESC_5
736 736
 #define MORE_CUSTOM6_TEXT_EN  USER_DESC_6
737
-#define MORE_CUSTOM7_TEXT_EN  USER_DESC_7

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h View File

@@ -266,4 +266,3 @@
266 266
 #define MORE_CUSTOM4_TEXT_FR  USER_DESC_4
267 267
 #define MORE_CUSTOM5_TEXT_FR  USER_DESC_5
268 268
 #define MORE_CUSTOM6_TEXT_FR  USER_DESC_6
269
-#define MORE_CUSTOM7_TEXT_FR  USER_DESC_7

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h View File

@@ -263,4 +263,3 @@
263 263
 #define MORE_CUSTOM4_TEXT_IT  USER_DESC_4
264 264
 #define MORE_CUSTOM5_TEXT_IT  USER_DESC_5
265 265
 #define MORE_CUSTOM6_TEXT_IT  USER_DESC_6
266
-#define MORE_CUSTOM7_TEXT_IT  USER_DESC_7

+ 0
- 6
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h View File

@@ -261,11 +261,7 @@
261 261
 #define MORE_CUSTOM4_TEXT_RU  USER_DESC_4
262 262
 #define MORE_CUSTOM5_TEXT_RU  USER_DESC_5
263 263
 #define MORE_CUSTOM6_TEXT_RU  USER_DESC_6
264
-#define MORE_CUSTOM7_TEXT_RU  USER_DESC_7
265 264
 
266
-//Malderin translate
267
-//
268
-//
269 265
 #define EEPROM_STORE_TIPS_RU          "Cохранить настройки в EEPROM?"
270 266
 #define EEPROM_READ_TIPS_RU           "читать настройки из EEPROM?"
271 267
 #define EEPROM_REVERT_TIPS_RU         "Cбросить настройки к значениям по умолчанию?"
@@ -365,5 +361,3 @@
365 361
 
366 362
 #define ENCODER_CONF_TITLE_RU           "Hастройки принтера>Hастройки энкодера"
367 363
 #define ENCODER_CONF_TEXT_RU            "энкодер используется?"
368
-
369
-//end of Malderin translate

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h View File

@@ -501,4 +501,3 @@
501 501
 #define MORE_CUSTOM4_TEXT_CN  USER_DESC_4
502 502
 #define MORE_CUSTOM5_TEXT_CN  USER_DESC_5
503 503
 #define MORE_CUSTOM6_TEXT_CN  USER_DESC_6
504
-#define MORE_CUSTOM7_TEXT_CN  USER_DESC_7

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h View File

@@ -272,4 +272,3 @@
272 272
 #define MORE_CUSTOM4_TEXT_SP  USER_DESC_4
273 273
 #define MORE_CUSTOM5_TEXT_SP  USER_DESC_5
274 274
 #define MORE_CUSTOM6_TEXT_SP  USER_DESC_6
275
-#define MORE_CUSTOM7_TEXT_SP  USER_DESC_7

+ 0
- 1
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h View File

@@ -499,4 +499,3 @@
499 499
 #define MORE_CUSTOM4_TEXT_T_CN  USER_DESC_4
500 500
 #define MORE_CUSTOM5_TEXT_T_CN  USER_DESC_5
501 501
 #define MORE_CUSTOM6_TEXT_T_CN  USER_DESC_6
502
-#define MORE_CUSTOM7_TEXT_T_CN  USER_DESC_7

+ 96
- 64
Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.cpp View File

@@ -945,13 +945,24 @@ void disp_language_init() {
945 945
       more_menu.title       = TITLE_MORE_CN;
946 946
       more_menu.gcode       = MORE_GCODE_CN;
947 947
       more_menu.entergcode  = MORE_ENTER_GCODE_CN;
948
-      TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_CN);
949
-      TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_CN);
950
-      TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_CN);
951
-      TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_CN);
952
-      TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_CN);
953
-      TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_CN);
954
-      TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_CN);
948
+      #if HAS_USER_ITEM(1)
949
+        more_menu.custom1 = MORE_CUSTOM1_TEXT_CN;
950
+      #endif
951
+      #if HAS_USER_ITEM(2)
952
+        more_menu.custom2 = MORE_CUSTOM2_TEXT_CN;
953
+      #endif
954
+      #if HAS_USER_ITEM(3)
955
+        more_menu.custom3 = MORE_CUSTOM3_TEXT_CN;
956
+      #endif
957
+      #if HAS_USER_ITEM(4)
958
+        more_menu.custom4 = MORE_CUSTOM4_TEXT_CN;
959
+      #endif
960
+      #if HAS_USER_ITEM(5)
961
+        more_menu.custom5 = MORE_CUSTOM5_TEXT_CN;
962
+      #endif
963
+      #if HAS_USER_ITEM(6)
964
+        more_menu.custom6 = MORE_CUSTOM6_TEXT_CN;
965
+      #endif
955 966
       // WIFI
956 967
       wifi_menu.title = WIFI_TEXT;
957 968
       wifi_menu.cloud     = CLOUD_TEXT_CN;
@@ -1179,13 +1190,24 @@ void disp_language_init() {
1179 1190
             more_menu.title       = TITLE_MORE_T_CN;
1180 1191
             more_menu.gcode       = MORE_GCODE_T_CN;
1181 1192
             more_menu.entergcode  = MORE_ENTER_GCODE_T_CN;
1182
-            TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_T_CN);
1183
-            TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_T_CN);
1184
-            TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_T_CN);
1185
-            TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_T_CN);
1186
-            TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_T_CN);
1187
-            TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_T_CN);
1188
-            TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_T_CN);
1193
+            #if HAS_USER_ITEM(1)
1194
+              more_menu.custom1 = MORE_CUSTOM1_TEXT_CN;
1195
+            #endif
1196
+            #if HAS_USER_ITEM(2)
1197
+              more_menu.custom2 = MORE_CUSTOM2_TEXT_CN;
1198
+            #endif
1199
+            #if HAS_USER_ITEM(3)
1200
+              more_menu.custom3 = MORE_CUSTOM3_TEXT_CN;
1201
+            #endif
1202
+            #if HAS_USER_ITEM(4)
1203
+              more_menu.custom4 = MORE_CUSTOM4_TEXT_CN;
1204
+            #endif
1205
+            #if HAS_USER_ITEM(5)
1206
+              more_menu.custom5 = MORE_CUSTOM5_TEXT_CN;
1207
+            #endif
1208
+            #if HAS_USER_ITEM(6)
1209
+              more_menu.custom6 = MORE_CUSTOM6_TEXT_CN;
1210
+            #endif
1189 1211
             // WIFI
1190 1212
             wifi_menu.title     = WIFI_TEXT;
1191 1213
             wifi_menu.cloud     = CLOUD_TEXT_T_CN;
@@ -1400,13 +1422,24 @@ void disp_language_init() {
1400 1422
             more_menu.title       = TITLE_MORE_EN;
1401 1423
             more_menu.gcode       = MORE_GCODE_EN;
1402 1424
             more_menu.entergcode  = MORE_ENTER_GCODE_EN;
1403
-            TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_EN);
1404
-            TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_EN);
1405
-            TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_EN);
1406
-            TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_EN);
1407
-            TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_EN);
1408
-            TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_EN);
1409
-            TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_EN);
1425
+            #if HAS_USER_ITEM(1)
1426
+              more_menu.custom1 = MORE_CUSTOM1_TEXT_EN;
1427
+            #endif
1428
+            #if HAS_USER_ITEM(2)
1429
+              more_menu.custom2 = MORE_CUSTOM2_TEXT_EN;
1430
+            #endif
1431
+            #if HAS_USER_ITEM(3)
1432
+              more_menu.custom3 = MORE_CUSTOM3_TEXT_EN;
1433
+            #endif
1434
+            #if HAS_USER_ITEM(4)
1435
+              more_menu.custom4 = MORE_CUSTOM4_TEXT_EN;
1436
+            #endif
1437
+            #if HAS_USER_ITEM(5)
1438
+              more_menu.custom5 = MORE_CUSTOM5_TEXT_EN;
1439
+            #endif
1440
+            #if HAS_USER_ITEM(6)
1441
+              more_menu.custom6 = MORE_CUSTOM6_TEXT_EN;
1442
+            #endif
1410 1443
 
1411 1444
             //
1412 1445
             filesys_menu.title   = TITLE_FILESYS_EN;
@@ -1622,27 +1655,24 @@ void disp_language_init() {
1622 1655
             more_menu.title       = TITLE_MORE_RU;
1623 1656
             more_menu.gcode       = MORE_GCODE_RU;
1624 1657
             more_menu.entergcode  = MORE_ENTER_GCODE_RU;
1625
-            #if ENABLED(USER_CMD_1_ENABLE)
1658
+            #if HAS_USER_ITEM(1)
1626 1659
               more_menu.custom1 = MORE_CUSTOM1_TEXT_RU;
1627 1660
             #endif
1628
-            #if ENABLED(USER_CMD_2_ENABLE)
1661
+            #if HAS_USER_ITEM(2)
1629 1662
               more_menu.custom2 = MORE_CUSTOM2_TEXT_RU;
1630 1663
             #endif
1631
-            #if ENABLED(USER_CMD_3_ENABLE)
1664
+            #if HAS_USER_ITEM(3)
1632 1665
               more_menu.custom3 = MORE_CUSTOM3_TEXT_RU;
1633 1666
             #endif
1634
-            #if ENABLED(USER_CMD_4_ENABLE)
1667
+            #if HAS_USER_ITEM(4)
1635 1668
               more_menu.custom4 = MORE_CUSTOM4_TEXT_RU;
1636 1669
             #endif
1637
-            #if ENABLED(USER_CMD_5_ENABLE)
1670
+            #if HAS_USER_ITEM(5)
1638 1671
               more_menu.custom5 = MORE_CUSTOM5_TEXT_RU;
1639 1672
             #endif
1640
-            #if ENABLED(USER_CMD_6_ENABLE)
1673
+            #if HAS_USER_ITEM(6)
1641 1674
               more_menu.custom6 = MORE_CUSTOM6_TEXT_RU;
1642 1675
             #endif
1643
-            #if ENABLED(USER_CMD_7_ENABLE)
1644
-              more_menu.custom7 = MORE_CUSTOM7_TEXT_RU;
1645
-            #endif
1646 1676
             //
1647 1677
             filesys_menu.title   = TITLE_FILESYS_RU;
1648 1678
             filesys_menu.sd_sys  = SD_CARD_TEXT_RU;
@@ -1954,27 +1984,24 @@ void disp_language_init() {
1954 1984
             more_menu.title       = TITLE_MORE_SP;
1955 1985
             more_menu.gcode       = MORE_GCODE_SP;
1956 1986
             more_menu.entergcode  = MORE_ENTER_GCODE_SP;
1957
-            #if ENABLED(USER_CMD_1_ENABLE)
1987
+            #if HAS_USER_ITEM(1)
1958 1988
               more_menu.custom1 = MORE_CUSTOM1_TEXT_SP;
1959 1989
             #endif
1960
-            #if ENABLED(USER_CMD_2_ENABLE)
1990
+            #if HAS_USER_ITEM(2)
1961 1991
               more_menu.custom2 = MORE_CUSTOM2_TEXT_SP;
1962 1992
             #endif
1963
-            #if ENABLED(USER_CMD_3_ENABLE)
1993
+            #if HAS_USER_ITEM(3)
1964 1994
               more_menu.custom3 = MORE_CUSTOM3_TEXT_SP;
1965 1995
             #endif
1966
-            #if ENABLED(USER_CMD_4_ENABLE)
1996
+            #if HAS_USER_ITEM(4)
1967 1997
               more_menu.custom4 = MORE_CUSTOM4_TEXT_SP;
1968 1998
             #endif
1969
-            #if ENABLED(USER_CMD_5_ENABLE)
1999
+            #if HAS_USER_ITEM(5)
1970 2000
               more_menu.custom5 = MORE_CUSTOM5_TEXT_SP;
1971 2001
             #endif
1972
-            #if ENABLED(USER_CMD_6_ENABLE)
2002
+            #if HAS_USER_ITEM(6)
1973 2003
               more_menu.custom6 = MORE_CUSTOM6_TEXT_SP;
1974 2004
             #endif
1975
-            #if ENABLED(USER_CMD_7_ENABLE)
1976
-              more_menu.custom7 = MORE_CUSTOM7_TEXT_SP;
1977
-            #endif
1978 2005
             //
1979 2006
             filesys_menu.title   = TITLE_FILESYS_SP;
1980 2007
             filesys_menu.sd_sys  = SD_CARD_TEXT_SP;
@@ -2191,27 +2218,24 @@ void disp_language_init() {
2191 2218
           more_menu.title       = TITLE_MORE_FR;
2192 2219
           more_menu.gcode       = MORE_GCODE_FR;
2193 2220
           more_menu.entergcode  = MORE_ENTER_GCODE_FR;
2194
-          #if ENABLED(USER_CMD_1_ENABLE)
2221
+          #if HAS_USER_ITEM(1)
2195 2222
             more_menu.custom1 = MORE_CUSTOM1_TEXT_FR;
2196 2223
           #endif
2197
-          #if ENABLED(USER_CMD_2_ENABLE)
2224
+          #if HAS_USER_ITEM(2)
2198 2225
             more_menu.custom2 = MORE_CUSTOM2_TEXT_FR;
2199 2226
           #endif
2200
-          #if ENABLED(USER_CMD_3_ENABLE)
2227
+          #if HAS_USER_ITEM(3)
2201 2228
             more_menu.custom3 = MORE_CUSTOM3_TEXT_FR;
2202 2229
           #endif
2203
-          #if ENABLED(USER_CMD_4_ENABLE)
2230
+          #if HAS_USER_ITEM(4)
2204 2231
             more_menu.custom4 = MORE_CUSTOM4_TEXT_FR;
2205 2232
           #endif
2206
-          #if ENABLED(USER_CMD_5_ENABLE)
2233
+          #if HAS_USER_ITEM(5)
2207 2234
             more_menu.custom5 = MORE_CUSTOM5_TEXT_FR;
2208 2235
           #endif
2209
-          #if ENABLED(USER_CMD_6_ENABLE)
2236
+          #if HAS_USER_ITEM(6)
2210 2237
             more_menu.custom6 = MORE_CUSTOM6_TEXT_FR;
2211 2238
           #endif
2212
-          #if ENABLED(USER_CMD_7_ENABLE)
2213
-            more_menu.custom7 = MORE_CUSTOM7_TEXT_FR;
2214
-          #endif
2215 2239
           //
2216 2240
           filesys_menu.title          = TITLE_FILESYS_FR;
2217 2241
           filesys_menu.sd_sys         = SD_CARD_TEXT_FR;
@@ -2429,27 +2453,24 @@ void disp_language_init() {
2429 2453
           more_menu.title       = TITLE_MORE_IT;
2430 2454
           more_menu.gcode       = MORE_GCODE_IT;
2431 2455
           more_menu.entergcode  = MORE_ENTER_GCODE_IT;
2432
-          #if ENABLED(USER_CMD_1_ENABLE)
2456
+          #if HAS_USER_ITEM(1)
2433 2457
             more_menu.custom1 = MORE_CUSTOM1_TEXT_IT;
2434 2458
           #endif
2435
-          #if ENABLED(USER_CMD_2_ENABLE)
2459
+          #if HAS_USER_ITEM(2)
2436 2460
             more_menu.custom2 = MORE_CUSTOM2_TEXT_IT;
2437 2461
           #endif
2438
-          #if ENABLED(USER_CMD_3_ENABLE)
2462
+          #if HAS_USER_ITEM(3)
2439 2463
             more_menu.custom3 = MORE_CUSTOM3_TEXT_IT;
2440 2464
           #endif
2441
-          #if ENABLED(USER_CMD_4_ENABLE)
2465
+          #if HAS_USER_ITEM(4)
2442 2466
             more_menu.custom4 = MORE_CUSTOM4_TEXT_IT;
2443 2467
           #endif
2444
-          #if ENABLED(USER_CMD_5_ENABLE)
2468
+          #if HAS_USER_ITEM(5)
2445 2469
             more_menu.custom5 = MORE_CUSTOM5_TEXT_IT;
2446 2470
           #endif
2447
-          #if ENABLED(USER_CMD_6_ENABLE)
2471
+          #if HAS_USER_ITEM(6)
2448 2472
             more_menu.custom6 = MORE_CUSTOM6_TEXT_IT;
2449 2473
           #endif
2450
-          #if ENABLED(USER_CMD_7_ENABLE)
2451
-            more_menu.custom7 = MORE_CUSTOM7_TEXT_IT;
2452
-          #endif
2453 2474
           //
2454 2475
           filesys_menu.title   = TITLE_FILESYS_IT;
2455 2476
           filesys_menu.sd_sys  = SD_CARD_TEXT_IT;
@@ -2667,13 +2688,24 @@ void disp_language_init() {
2667 2688
       more_menu.title       = TITLE_MORE_EN;
2668 2689
       more_menu.gcode       = MORE_GCODE_EN;
2669 2690
       more_menu.entergcode  = MORE_ENTER_GCODE_EN;
2670
-      TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_EN);
2671
-      TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_EN);
2672
-      TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_EN);
2673
-      TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_EN);
2674
-      TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_EN);
2675
-      TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_EN);
2676
-      TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_EN);
2691
+      #if HAS_USER_ITEM(1)
2692
+        more_menu.custom1 = MORE_CUSTOM1_TEXT_EN;
2693
+      #endif
2694
+      #if HAS_USER_ITEM(2)
2695
+        more_menu.custom2 = MORE_CUSTOM2_TEXT_EN;
2696
+      #endif
2697
+      #if HAS_USER_ITEM(3)
2698
+        more_menu.custom3 = MORE_CUSTOM3_TEXT_EN;
2699
+      #endif
2700
+      #if HAS_USER_ITEM(4)
2701
+        more_menu.custom4 = MORE_CUSTOM4_TEXT_EN;
2702
+      #endif
2703
+      #if HAS_USER_ITEM(5)
2704
+        more_menu.custom5 = MORE_CUSTOM5_TEXT_EN;
2705
+      #endif
2706
+      #if HAS_USER_ITEM(6)
2707
+        more_menu.custom6 = MORE_CUSTOM6_TEXT_EN;
2708
+      #endif
2677 2709
       //
2678 2710
       filesys_menu.title   = TITLE_FILESYS_EN;
2679 2711
       filesys_menu.sd_sys  = SD_CARD_TEXT_EN;

+ 0
- 1
Marlin/src/lcd/menu/menu_custom.cpp View File

@@ -46,7 +46,6 @@ void _lcd_user_gcode(PGM_P const cmd) {
46 46
 void menu_user() {
47 47
   START_MENU();
48 48
   BACK_ITEM(MSG_MAIN);
49
-  #define HAS_USER_ITEM(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N))
50 49
   #define USER_ITEM(N) ACTION_ITEM_P(PSTR(USER_DESC_##N), []{ _lcd_user_gcode(PSTR(USER_GCODE_##N _DONE_SCRIPT)); });
51 50
   #if HAS_USER_ITEM(1)
52 51
     USER_ITEM(1);

Loading…
Cancel
Save