Quellcode durchsuchen

Main / Config Custom Submenus (#18177)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
borland1 vor 3 Jahren
Ursprung
Commit
df1ef496d1
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
36 geänderte Dateien mit 440 neuen und 367 gelöschten Zeilen
  1. 65
    33
      Marlin/Configuration_adv.h
  2. 1
    1
      Marlin/src/inc/Conditionals_adv.h
  3. 2
    103
      Marlin/src/inc/SanityCheck.h
  4. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp
  5. 7
    7
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp
  6. 2
    6
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h
  7. 6
    6
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h
  8. 6
    6
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h
  9. 6
    6
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h
  10. 6
    6
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h
  11. 6
    6
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h
  12. 6
    6
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h
  13. 6
    6
      Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h
  14. 1
    1
      Marlin/src/lcd/language/language_cz.h
  15. 1
    1
      Marlin/src/lcd/language/language_de.h
  16. 1
    1
      Marlin/src/lcd/language/language_en.h
  17. 1
    1
      Marlin/src/lcd/language/language_es.h
  18. 1
    1
      Marlin/src/lcd/language/language_fr.h
  19. 1
    1
      Marlin/src/lcd/language/language_gl.h
  20. 1
    1
      Marlin/src/lcd/language/language_it.h
  21. 1
    1
      Marlin/src/lcd/language/language_jp_kana.h
  22. 1
    1
      Marlin/src/lcd/language/language_pl.h
  23. 1
    1
      Marlin/src/lcd/language/language_pt_br.h
  24. 1
    1
      Marlin/src/lcd/language/language_ro.h
  25. 1
    1
      Marlin/src/lcd/language/language_ru.h
  26. 1
    1
      Marlin/src/lcd/language/language_sk.h
  27. 1
    1
      Marlin/src/lcd/language/language_tr.h
  28. 1
    1
      Marlin/src/lcd/language/language_uk.h
  29. 1
    1
      Marlin/src/lcd/language/language_vi.h
  30. 1
    1
      Marlin/src/lcd/language/language_zh_CN.h
  31. 1
    1
      Marlin/src/lcd/language/language_zh_TW.h
  32. 152
    0
      Marlin/src/lcd/menu/menu_configuration.cpp
  33. 0
    141
      Marlin/src/lcd/menu/menu_custom.cpp
  34. 147
    9
      Marlin/src/lcd/menu/menu_main.cpp
  35. 0
    3
      buildroot/share/PlatformIO/scripts/common-dependencies.h
  36. 2
    2
      buildroot/tests/mega2560

+ 65
- 33
Marlin/Configuration_adv.h Datei anzeigen

@@ -3416,6 +3416,71 @@
3416 3416
 #endif
3417 3417
 
3418 3418
 /**
3419
+ * User-defined menu items to run custom G-code.
3420
+ * Up to 25 may be defined, but the actual number is LCD-dependent.
3421
+ */
3422
+
3423
+// Custom Menu: Main Menu
3424
+//#define CUSTOM_MENU_MAIN
3425
+#if ENABLED(CUSTOM_MENU_MAIN)
3426
+  //#define CUSTOM_MENU_MAIN_TITLE "Custom Commands"
3427
+  #define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 User Script Done"
3428
+  #define CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK
3429
+  //#define CUSTOM_MENU_MAIN_SCRIPT_RETURN   // Return to status screen after a script
3430
+  #define CUSTOM_MENU_MAIN_ONLY_IDLE         // Only show custom menu when the machine is idle
3431
+
3432
+  #define MAIN_MENU_ITEM_1_DESC "Home & UBL Info"
3433
+  #define MAIN_MENU_ITEM_1_GCODE "G28\nG29 W"
3434
+  //#define MAIN_MENU_ITEM_1_CONFIRM          // Show a confirmation dialog before this action
3435
+
3436
+  #define MAIN_MENU_ITEM_2_DESC "Preheat for " PREHEAT_1_LABEL
3437
+  #define MAIN_MENU_ITEM_2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
3438
+  //#define MAIN_MENU_ITEM_2_CONFIRM
3439
+
3440
+  //#define MAIN_MENU_ITEM_3_DESC "Preheat for " PREHEAT_2_LABEL
3441
+  //#define MAIN_MENU_ITEM_3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
3442
+  //#define MAIN_MENU_ITEM_3_CONFIRM
3443
+
3444
+  //#define MAIN_MENU_ITEM_4_DESC "Heat Bed/Home/Level"
3445
+  //#define MAIN_MENU_ITEM_4_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
3446
+  //#define MAIN_MENU_ITEM_4_CONFIRM
3447
+
3448
+  //#define MAIN_MENU_ITEM_5_DESC "Home & Info"
3449
+  //#define MAIN_MENU_ITEM_5_GCODE "G28\nM503"
3450
+  //#define MAIN_MENU_ITEM_5_CONFIRM
3451
+#endif
3452
+
3453
+// Custom Menu: Configuration Menu
3454
+//#define CUSTOM_MENU_CONFIG
3455
+#if ENABLED(CUSTOM_MENU_CONFIG)
3456
+  //#define CUSTOM_MENU_CONFIG_TITLE "Custom Commands"
3457
+  #define CUSTOM_MENU_CONFIG_SCRIPT_DONE "M117 Wireless Script Done"
3458
+  #define CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK
3459
+  //#define CUSTOM_MENU_CONFIG_SCRIPT_RETURN  // Return to status screen after a script
3460
+  #define CUSTOM_MENU_CONFIG_ONLY_IDLE        // Only show custom menu when the machine is idle
3461
+
3462
+  #define CONFIG_MENU_ITEM_1_DESC "Wifi ON"
3463
+  #define CONFIG_MENU_ITEM_1_GCODE "M118 [ESP110] WIFI-STA pwd=12345678"
3464
+  //#define CONFIG_MENU_ITEM_1_CONFIRM        // Show a confirmation dialog before this action
3465
+
3466
+  #define CONFIG_MENU_ITEM_2_DESC "Bluetooth ON"
3467
+  #define CONFIG_MENU_ITEM_2_GCODE "M118 [ESP110] BT pwd=12345678"
3468
+  //#define CONFIG_MENU_ITEM_2_CONFIRM
3469
+
3470
+  //#define CONFIG_MENU_ITEM_3_DESC "Radio OFF"
3471
+  //#define CONFIG_MENU_ITEM_3_GCODE "M118 [ESP110] OFF pwd=12345678"
3472
+  //#define CONFIG_MENU_ITEM_3_CONFIRM
3473
+
3474
+  //#define CONFIG_MENU_ITEM_4_DESC "Wifi ????"
3475
+  //#define CONFIG_MENU_ITEM_4_GCODE "M118 ????"
3476
+  //#define CONFIG_MENU_ITEM_4_CONFIRM
3477
+
3478
+  //#define CONFIG_MENU_ITEM_5_DESC "Wifi ????"
3479
+  //#define CONFIG_MENU_ITEM_5_GCODE "M118 ????"
3480
+  //#define CONFIG_MENU_ITEM_5_CONFIRM
3481
+#endif
3482
+
3483
+/**
3419 3484
  * User-defined buttons to run custom G-code.
3420 3485
  * Up to 25 may be defined.
3421 3486
  */
@@ -3447,39 +3512,6 @@
3447 3512
 #endif
3448 3513
 
3449 3514
 /**
3450
- * User-defined menu items to run custom G-code.
3451
- * Up to 25 may be defined, but the actual number is LCD-dependent.
3452
- */
3453
-//#define CUSTOM_USER_MENUS
3454
-#if ENABLED(CUSTOM_USER_MENUS)
3455
-  //#define CUSTOM_USER_MENU_TITLE "Custom Commands"
3456
-  #define USER_SCRIPT_DONE "M117 User Script Done"
3457
-  #define USER_SCRIPT_AUDIBLE_FEEDBACK
3458
-  //#define USER_SCRIPT_RETURN    // Return to status screen after a script
3459
-  #define CUSTOM_MENU_ONLY_IDLE   // Only show custom menu when the machine is idle
3460
-
3461
-  #define USER_DESC_1 "Home & UBL Info"
3462
-  #define USER_GCODE_1 "G28\nG29W"
3463
-  //#define USER_CONFIRM_1        // Show a confirmation dialog before this action
3464
-
3465
-  #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
3466
-  #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
3467
-  //#define USER_CONFIRM_2
3468
-
3469
-  #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
3470
-  #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
3471
-  //#define USER_CONFIRM_3
3472
-
3473
-  #define USER_DESC_4 "Heat Bed/Home/Level"
3474
-  #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
3475
-  //#define USER_CONFIRM_4
3476
-
3477
-  #define USER_DESC_5 "Home & Info"
3478
-  #define USER_GCODE_5 "G28\nM503"
3479
-  //#define USER_CONFIRM_5
3480
-#endif
3481
-
3482
-/**
3483 3515
  * Host Action Commands
3484 3516
  *
3485 3517
  * Define host streamer action commands in compliance with the standard.

+ 1
- 1
Marlin/src/inc/Conditionals_adv.h Datei anzeigen

@@ -536,7 +536,7 @@
536 536
                          (defined(MMU2_SERIAL_PORT) && MMU2_SERIAL_PORT == (N)) || \
537 537
                          (defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == (N))
538 538
 
539
-#if ENABLED(CUSTOM_USER_MENUS)
539
+#if BOTH(HAS_TFT_LVGL_UI, CUSTOM_MENU_MAIN)
540 540
   #define _HAS_1(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N))
541 541
   #define HAS_USER_ITEM(V...) DO(HAS,||,V)
542 542
 #else

+ 2
- 103
Marlin/src/inc/SanityCheck.h Datei anzeigen

@@ -553,6 +553,8 @@
553 553
   #error "Z_AFTER_DEACTIVATE is replaced by Z_IDLE_HEIGHT."
554 554
 #elif defined(MEATPACK)
555 555
   #error "MEATPACK is now enabled with MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2, etc."
556
+#elif defined(CUSTOM_USER_MENUS)
557
+  #error "CUSTOM_USER_MENUS has been replaced by CUSTOM_MENU_MAIN and CUSTOM_MENU_CONFIG."
556 558
 #endif
557 559
 
558 560
 /**
@@ -2986,109 +2988,6 @@ static_assert(   _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
2986 2988
   #error "GCODE_MACROS_SLOTS must be a number from 1 to 10."
2987 2989
 #endif
2988 2990
 
2989
-#if ENABLED(CUSTOM_USER_MENUS)
2990
-  #ifdef USER_GCODE_1
2991
-    constexpr char _chr1 = USER_GCODE_1[strlen(USER_GCODE_1) - 1];
2992
-    static_assert(_chr1 != '\n' && _chr1 != '\r', "USER_GCODE_1 cannot have a newline at the end. Please remove it.");
2993
-  #endif
2994
-  #ifdef USER_GCODE_2
2995
-    constexpr char _chr2 = USER_GCODE_2[strlen(USER_GCODE_2) - 1];
2996
-    static_assert(_chr2 != '\n' && _chr2 != '\r', "USER_GCODE_2 cannot have a newline at the end. Please remove it.");
2997
-  #endif
2998
-  #ifdef USER_GCODE_3
2999
-    constexpr char _chr3 = USER_GCODE_3[strlen(USER_GCODE_3) - 1];
3000
-    static_assert(_chr3 != '\n' && _chr3 != '\r', "USER_GCODE_3 cannot have a newline at the end. Please remove it.");
3001
-  #endif
3002
-  #ifdef USER_GCODE_4
3003
-    constexpr char _chr4 = USER_GCODE_4[strlen(USER_GCODE_4) - 1];
3004
-    static_assert(_chr4 != '\n' && _chr4 != '\r', "USER_GCODE_4 cannot have a newline at the end. Please remove it.");
3005
-  #endif
3006
-  #ifdef USER_GCODE_5
3007
-    constexpr char _chr5 = USER_GCODE_5[strlen(USER_GCODE_5) - 1];
3008
-    static_assert(_chr5 != '\n' && _chr5 != '\r', "USER_GCODE_5 cannot have a newline at the end. Please remove it.");
3009
-  #endif
3010
-  #ifdef USER_GCODE_6
3011
-    constexpr char _chr6 = USER_GCODE_6[strlen(USER_GCODE_6) - 1];
3012
-    static_assert(_chr6 != '\n' && _chr6 != '\r', "USER_GCODE_6 cannot have a newline at the end. Please remove it.");
3013
-  #endif
3014
-  #ifdef USER_GCODE_7
3015
-    constexpr char _chr7 = USER_GCODE_7[strlen(USER_GCODE_7) - 1];
3016
-    static_assert(_chr7 != '\n' && _chr7 != '\r', "USER_GCODE_7 cannot have a newline at the end. Please remove it.");
3017
-  #endif
3018
-  #ifdef USER_GCODE_8
3019
-    constexpr char _chr8 = USER_GCODE_8[strlen(USER_GCODE_8) - 1];
3020
-    static_assert(_chr8 != '\n' && _chr8 != '\r', "USER_GCODE_8 cannot have a newline at the end. Please remove it.");
3021
-  #endif
3022
-  #ifdef USER_GCODE_9
3023
-    constexpr char _chr9 = USER_GCODE_9[strlen(USER_GCODE_9) - 1];
3024
-    static_assert(_chr9 != '\n' && _chr9 != '\r', "USER_GCODE_9 cannot have a newline at the end. Please remove it.");
3025
-  #endif
3026
-  #ifdef USER_GCODE_10
3027
-    constexpr char _chr10 = USER_GCODE_10[strlen(USER_GCODE_10) - 1];
3028
-    static_assert(_chr10 != '\n' && _chr10 != '\r', "USER_GCODE_10 cannot have a newline at the end. Please remove it.");
3029
-  #endif
3030
-  #ifdef USER_GCODE_11
3031
-    constexpr char _chr11 = USER_GCODE_11[strlen(USER_GCODE_11) - 1];
3032
-    static_assert(_chr11 != '\n' && _chr11 != '\r', "USER_GCODE_11 cannot have a newline at the end. Please remove it.");
3033
-  #endif
3034
-  #ifdef USER_GCODE_12
3035
-    constexpr char _chr12 = USER_GCODE_12[strlen(USER_GCODE_12) - 1];
3036
-    static_assert(_chr12 != '\n' && _chr12 != '\r', "USER_GCODE_12 cannot have a newline at the end. Please remove it.");
3037
-  #endif
3038
-  #ifdef USER_GCODE_13
3039
-    constexpr char _chr13 = USER_GCODE_13[strlen(USER_GCODE_13) - 1];
3040
-    static_assert(_chr13 != '\n' && _chr13 != '\r', "USER_GCODE_13 cannot have a newline at the end. Please remove it.");
3041
-  #endif
3042
-  #ifdef USER_GCODE_14
3043
-    constexpr char _chr14 = USER_GCODE_14[strlen(USER_GCODE_14) - 1];
3044
-    static_assert(_chr14 != '\n' && _chr14 != '\r', "USER_GCODE_14 cannot have a newline at the end. Please remove it.");
3045
-  #endif
3046
-  #ifdef USER_GCODE_15
3047
-    constexpr char _chr15 = USER_GCODE_15[strlen(USER_GCODE_15) - 1];
3048
-    static_assert(_chr15 != '\n' && _chr15 != '\r', "USER_GCODE_15 cannot have a newline at the end. Please remove it.");
3049
-  #endif
3050
-  #ifdef USER_GCODE_16
3051
-    constexpr char _chr16 = USER_GCODE_16[strlen(USER_GCODE_16) - 1];
3052
-    static_assert(_chr16 != '\n' && _chr16 != '\r', "USER_GCODE_16 cannot have a newline at the end. Please remove it.");
3053
-  #endif
3054
-  #ifdef USER_GCODE_17
3055
-    constexpr char _chr17 = USER_GCODE_17[strlen(USER_GCODE_17) - 1];
3056
-    static_assert(_chr17 != '\n' && _chr17 != '\r', "USER_GCODE_17 cannot have a newline at the end. Please remove it.");
3057
-  #endif
3058
-  #ifdef USER_GCODE_18
3059
-    constexpr char _chr18 = USER_GCODE_18[strlen(USER_GCODE_18) - 1];
3060
-    static_assert(_chr18 != '\n' && _chr18 != '\r', "USER_GCODE_18 cannot have a newline at the end. Please remove it.");
3061
-  #endif
3062
-  #ifdef USER_GCODE_19
3063
-    constexpr char _chr19 = USER_GCODE_19[strlen(USER_GCODE_19) - 1];
3064
-    static_assert(_chr19 != '\n' && _chr19 != '\r', "USER_GCODE_19 cannot have a newline at the end. Please remove it.");
3065
-  #endif
3066
-  #ifdef USER_GCODE_20
3067
-    constexpr char _chr20 = USER_GCODE_20[strlen(USER_GCODE_20) - 1];
3068
-    static_assert(_chr20 != '\n' && _chr20 != '\r', "USER_GCODE_20 cannot have a newline at the end. Please remove it.");
3069
-  #endif
3070
-  #ifdef USER_GCODE_21
3071
-    constexpr char _chr21 = USER_GCODE_21[strlen(USER_GCODE_21) - 1];
3072
-    static_assert(_chr21 != '\n' && _chr21 != '\r', "USER_GCODE_21 cannot have a newline at the end. Please remove it.");
3073
-  #endif
3074
-  #ifdef USER_GCODE_22
3075
-    constexpr char _chr22 = USER_GCODE_22[strlen(USER_GCODE_22) - 1];
3076
-    static_assert(_chr22 != '\n' && _chr22 != '\r', "USER_GCODE_22 cannot have a newline at the end. Please remove it.");
3077
-  #endif
3078
-  #ifdef USER_GCODE_23
3079
-    constexpr char _chr23 = USER_GCODE_23[strlen(USER_GCODE_23) - 1];
3080
-    static_assert(_chr23 != '\n' && _chr23 != '\r', "USER_GCODE_23 cannot have a newline at the end. Please remove it.");
3081
-  #endif
3082
-  #ifdef USER_GCODE_24
3083
-    constexpr char _chr24 = USER_GCODE_24[strlen(USER_GCODE_24) - 1];
3084
-    static_assert(_chr24 != '\n' && _chr24 != '\r', "USER_GCODE_24 cannot have a newline at the end. Please remove it.");
3085
-  #endif
3086
-  #ifdef USER_GCODE_25
3087
-    constexpr char _chr25 = USER_GCODE_25[strlen(USER_GCODE_25) - 1];
3088
-    static_assert(_chr25 != '\n' && _chr25 != '\r', "USER_GCODE_25 cannot have a newline at the end. Please remove it.");
3089
-  #endif
3090
-#endif
3091
-
3092 2991
 #if ENABLED(BACKLASH_COMPENSATION)
3093 2992
   #ifndef BACKLASH_DISTANCE_MM
3094 2993
     #error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM."

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp Datei anzeigen

@@ -30,8 +30,8 @@ using namespace ExtUI;
30 30
 using namespace Theme;
31 31
 
32 32
 #define _ITEM_TAG(N) (10+N)
33
-#define _USER_DESC(N) USER_DESC_##N
34
-#define _USER_GCODE(N) USER_GCODE_##N
33
+#define _USER_DESC(N) MAIN_MENU_ITEM_##N##_DESC
34
+#define _USER_GCODE(N) MAIN_MENU_ITEM_##N##_GCODE
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
 

+ 7
- 7
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp Datei anzeigen

@@ -41,9 +41,9 @@ void MainMenu::onRedraw(draw_mode_t what) {
41 41
     #define GRID_COLS 2
42 42
     #define ABOUT_PRINTER_POS     BTN_POS(1,1), BTN_SIZE(2,1)
43 43
     #define ADVANCED_SETTINGS_POS BTN_POS(1,2), BTN_SIZE(2,1)
44
-    #if ENABLED(CUSTOM_USER_MENUS)
44
+    #if ENABLED(CUSTOM_MENU_MAIN)
45 45
       #define FILAMENTCHANGE_POS  BTN_POS(1,3), BTN_SIZE(1,1)
46
-      #define CUSTOM_USER_MENUS_POS BTN_POS(2,3), BTN_SIZE(1,1)
46
+      #define CUSTOM_MENU_POS BTN_POS(2,3), BTN_SIZE(1,1)
47 47
     #else
48 48
       #define FILAMENTCHANGE_POS  BTN_POS(1,3), BTN_SIZE(2,1)
49 49
     #endif
@@ -63,10 +63,10 @@ void MainMenu::onRedraw(draw_mode_t what) {
63 63
     #define CLEAN_NOZZLE_POS      BTN_POS(4,2), BTN_SIZE(3,1)
64 64
     #define MOVE_AXIS_POS         BTN_POS(1,3), BTN_SIZE(3,1)
65 65
     #define DISABLE_STEPPERS_POS  BTN_POS(4,3), BTN_SIZE(3,1)
66
-    #if ENABLED(CUSTOM_USER_MENUS)
66
+    #if ENABLED(CUSTOM_MENU_MAIN)
67 67
       #define TEMPERATURE_POS     BTN_POS(1,4), BTN_SIZE(2,1)
68 68
       #define FILAMENTCHANGE_POS  BTN_POS(3,4), BTN_SIZE(2,1)
69
-      #define CUSTOM_USER_MENUS_POS BTN_POS(5,4), BTN_SIZE(2,1)
69
+      #define CUSTOM_MENU_POS BTN_POS(5,4), BTN_SIZE(2,1)
70 70
     #else
71 71
       #define TEMPERATURE_POS     BTN_POS(1,4), BTN_SIZE(3,1)
72 72
       #define FILAMENTCHANGE_POS  BTN_POS(4,4), BTN_SIZE(3,1)
@@ -91,8 +91,8 @@ void MainMenu::onRedraw(draw_mode_t what) {
91 91
        .enabled(TERN_(HAS_LEVELING, 1))
92 92
        .tag( 9).button(LEVELING_POS,        GET_TEXT_F(MSG_LEVELING))
93 93
        .tag(10).button(ABOUT_PRINTER_POS,   GET_TEXT_F(MSG_INFO_MENU))
94
-       #if ENABLED(CUSTOM_USER_MENUS)
95
-        .tag(11).button(CUSTOM_USER_MENUS_POS, GET_TEXT_F(MSG_USER_MENU))
94
+       #if ENABLED(CUSTOM_MENU_MAIN)
95
+        .tag(11).button(CUSTOM_MENU_POS, GET_TEXT_F(MSG_CUSTOM_COMMANDS))
96 96
        #endif
97 97
        .colors(action_btn)
98 98
        .tag(1).button(BACK_POS,             GET_TEXT_F(MSG_BACK));
@@ -117,7 +117,7 @@ bool MainMenu::onTouchEnd(uint8_t tag) {
117 117
       case 9:  GOTO_SCREEN(LevelingMenu);                             break;
118 118
     #endif
119 119
     case 10: GOTO_SCREEN(AboutScreen);                                break;
120
-    #if ENABLED(CUSTOM_USER_MENUS)
120
+    #if ENABLED(CUSTOM_MENU_MAIN)
121 121
       case 11: GOTO_SCREEN(CustomUserMenus);                          break;
122 122
     #endif
123 123
 

+ 2
- 6
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h Datei anzeigen

@@ -22,8 +22,6 @@
22 22
 
23 23
 #pragma once
24 24
 
25
-#if ENABLED(TOUCH_UI_FTDI_EVE)
26
-
27 25
 #include "../ftdi_eve_lib/ftdi_eve_lib.h"
28 26
 #include "../language/language.h"
29 27
 #include "../theme/theme.h"
@@ -107,7 +105,7 @@ enum {
107 105
   #if ENABLED(SDSUPPORT)
108 106
     FILES_SCREEN_CACHE,
109 107
   #endif
110
-  #if ENABLED(CUSTOM_USER_MENUS)
108
+  #if ENABLED(CUSTOM_MENU_MAIN)
111 109
     CUSTOM_USER_MENUS_SCREEN_CACHE,
112 110
   #endif
113 111
   CHANGE_FILAMENT_SCREEN_CACHE,
@@ -248,7 +246,7 @@ enum {
248 246
   #include "files_screen.h"
249 247
 #endif
250 248
 
251
-#if ENABLED(CUSTOM_USER_MENUS)
249
+#if ENABLED(CUSTOM_MENU_MAIN)
252 250
   #include "custom_user_menus.h"
253 251
 #endif
254 252
 
@@ -262,5 +260,3 @@ enum {
262 260
 #if NUM_LANGUAGES > 1
263 261
   #include "language_menu.h"
264 262
 #endif
265
-
266
-#endif // TOUCH_UI_FTDI_EVE

+ 6
- 6
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h Datei anzeigen

@@ -728,9 +728,9 @@
728 728
 #define EEPROM_READ_TIPS_EN   "Read settings from EEPROM?"
729 729
 #define EEPROM_REVERT_TIPS_EN "Revert settings to factory defaults?"
730 730
 
731
-#define MORE_CUSTOM1_TEXT_EN  USER_DESC_1
732
-#define MORE_CUSTOM2_TEXT_EN  USER_DESC_2
733
-#define MORE_CUSTOM3_TEXT_EN  USER_DESC_3
734
-#define MORE_CUSTOM4_TEXT_EN  USER_DESC_4
735
-#define MORE_CUSTOM5_TEXT_EN  USER_DESC_5
736
-#define MORE_CUSTOM6_TEXT_EN  USER_DESC_6
731
+#define MORE_CUSTOM1_TEXT_EN  MAIN_MENU_ITEM_1_DESC
732
+#define MORE_CUSTOM2_TEXT_EN  MAIN_MENU_ITEM_2_DESC
733
+#define MORE_CUSTOM3_TEXT_EN  MAIN_MENU_ITEM_3_DESC
734
+#define MORE_CUSTOM4_TEXT_EN  MAIN_MENU_ITEM_4_DESC
735
+#define MORE_CUSTOM5_TEXT_EN  MAIN_MENU_ITEM_5_DESC
736
+#define MORE_CUSTOM6_TEXT_EN  MAIN_MENU_ITEM_6_DESC

+ 6
- 6
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h Datei anzeigen

@@ -260,9 +260,9 @@
260 260
 #define EEPROM_READ_TIPS_FR   "Lire les paramètres de l'EEPROM?"
261 261
 #define EEPROM_REVERT_TIPS_FR "Rétablir les paramètres par défaut d'usine?"
262 262
 
263
-#define MORE_CUSTOM1_TEXT_FR  USER_DESC_1
264
-#define MORE_CUSTOM2_TEXT_FR  USER_DESC_2
265
-#define MORE_CUSTOM3_TEXT_FR  USER_DESC_3
266
-#define MORE_CUSTOM4_TEXT_FR  USER_DESC_4
267
-#define MORE_CUSTOM5_TEXT_FR  USER_DESC_5
268
-#define MORE_CUSTOM6_TEXT_FR  USER_DESC_6
263
+#define MORE_CUSTOM1_TEXT_FR  MAIN_MENU_ITEM_1_DESC
264
+#define MORE_CUSTOM2_TEXT_FR  MAIN_MENU_ITEM_2_DESC
265
+#define MORE_CUSTOM3_TEXT_FR  MAIN_MENU_ITEM_3_DESC
266
+#define MORE_CUSTOM4_TEXT_FR  MAIN_MENU_ITEM_4_DESC
267
+#define MORE_CUSTOM5_TEXT_FR  MAIN_MENU_ITEM_5_DESC
268
+#define MORE_CUSTOM6_TEXT_FR  MAIN_MENU_ITEM_6_DESC

+ 6
- 6
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h Datei anzeigen

@@ -257,9 +257,9 @@
257 257
 #define EEPROM_READ_TIPS_IT               "Leggi le impostazioni dalla EEPROM?"
258 258
 #define EEPROM_REVERT_TIPS_IT             "Ripristinare le impostazioni predefinite?"
259 259
 
260
-#define MORE_CUSTOM1_TEXT_IT  USER_DESC_1
261
-#define MORE_CUSTOM2_TEXT_IT  USER_DESC_2
262
-#define MORE_CUSTOM3_TEXT_IT  USER_DESC_3
263
-#define MORE_CUSTOM4_TEXT_IT  USER_DESC_4
264
-#define MORE_CUSTOM5_TEXT_IT  USER_DESC_5
265
-#define MORE_CUSTOM6_TEXT_IT  USER_DESC_6
260
+#define MORE_CUSTOM1_TEXT_IT  MAIN_MENU_ITEM_1_DESC
261
+#define MORE_CUSTOM2_TEXT_IT  MAIN_MENU_ITEM_2_DESC
262
+#define MORE_CUSTOM3_TEXT_IT  MAIN_MENU_ITEM_3_DESC
263
+#define MORE_CUSTOM4_TEXT_IT  MAIN_MENU_ITEM_4_DESC
264
+#define MORE_CUSTOM5_TEXT_IT  MAIN_MENU_ITEM_5_DESC
265
+#define MORE_CUSTOM6_TEXT_IT  MAIN_MENU_ITEM_6_DESC

+ 6
- 6
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h Datei anzeigen

@@ -255,12 +255,12 @@
255 255
 #define EEPROM_SETTINGS_READ_RU       "Чтение настроек из EEPROM"
256 256
 #define EEPROM_SETTINGS_REVERT_RU     "Bосстановить заводские настройки по умолчанию"
257 257
 
258
-#define MORE_CUSTOM1_TEXT_RU  USER_DESC_1
259
-#define MORE_CUSTOM2_TEXT_RU  USER_DESC_2
260
-#define MORE_CUSTOM3_TEXT_RU  USER_DESC_3
261
-#define MORE_CUSTOM4_TEXT_RU  USER_DESC_4
262
-#define MORE_CUSTOM5_TEXT_RU  USER_DESC_5
263
-#define MORE_CUSTOM6_TEXT_RU  USER_DESC_6
258
+#define MORE_CUSTOM1_TEXT_RU  MAIN_MENU_ITEM_1_DESC
259
+#define MORE_CUSTOM2_TEXT_RU  MAIN_MENU_ITEM_2_DESC
260
+#define MORE_CUSTOM3_TEXT_RU  MAIN_MENU_ITEM_3_DESC
261
+#define MORE_CUSTOM4_TEXT_RU  MAIN_MENU_ITEM_4_DESC
262
+#define MORE_CUSTOM5_TEXT_RU  MAIN_MENU_ITEM_5_DESC
263
+#define MORE_CUSTOM6_TEXT_RU  MAIN_MENU_ITEM_6_DESC
264 264
 
265 265
 #define EEPROM_STORE_TIPS_RU          "Cохранить настройки в EEPROM?"
266 266
 #define EEPROM_READ_TIPS_RU           "читать настройки из EEPROM?"

+ 6
- 6
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h Datei anzeigen

@@ -495,9 +495,9 @@
495 495
 #define EEPROM_READ_TIPS_CN   "是否使用EEPROM参数?"
496 496
 #define EEPROM_REVERT_TIPS_CN "是否恢复默认参数?"
497 497
 
498
-#define MORE_CUSTOM1_TEXT_CN  USER_DESC_1
499
-#define MORE_CUSTOM2_TEXT_CN  USER_DESC_2
500
-#define MORE_CUSTOM3_TEXT_CN  USER_DESC_3
501
-#define MORE_CUSTOM4_TEXT_CN  USER_DESC_4
502
-#define MORE_CUSTOM5_TEXT_CN  USER_DESC_5
503
-#define MORE_CUSTOM6_TEXT_CN  USER_DESC_6
498
+#define MORE_CUSTOM1_TEXT_CN  MAIN_MENU_ITEM_1_DESC
499
+#define MORE_CUSTOM2_TEXT_CN  MAIN_MENU_ITEM_2_DESC
500
+#define MORE_CUSTOM3_TEXT_CN  MAIN_MENU_ITEM_3_DESC
501
+#define MORE_CUSTOM4_TEXT_CN  MAIN_MENU_ITEM_4_DESC
502
+#define MORE_CUSTOM5_TEXT_CN  MAIN_MENU_ITEM_5_DESC
503
+#define MORE_CUSTOM6_TEXT_CN  MAIN_MENU_ITEM_6_DESC

+ 6
- 6
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h Datei anzeigen

@@ -266,9 +266,9 @@
266 266
 #define EEPROM_READ_TIPS_SP   "Leer la configuración de EEPROM?"
267 267
 #define EEPROM_REVERT_TIPS_SP "Revert settings to factory defaults?"
268 268
 
269
-#define MORE_CUSTOM1_TEXT_SP  USER_DESC_1
270
-#define MORE_CUSTOM2_TEXT_SP  USER_DESC_2
271
-#define MORE_CUSTOM3_TEXT_SP  USER_DESC_3
272
-#define MORE_CUSTOM4_TEXT_SP  USER_DESC_4
273
-#define MORE_CUSTOM5_TEXT_SP  USER_DESC_5
274
-#define MORE_CUSTOM6_TEXT_SP  USER_DESC_6
269
+#define MORE_CUSTOM1_TEXT_SP  MAIN_MENU_ITEM_1_DESC
270
+#define MORE_CUSTOM2_TEXT_SP  MAIN_MENU_ITEM_2_DESC
271
+#define MORE_CUSTOM3_TEXT_SP  MAIN_MENU_ITEM_3_DESC
272
+#define MORE_CUSTOM4_TEXT_SP  MAIN_MENU_ITEM_4_DESC
273
+#define MORE_CUSTOM5_TEXT_SP  MAIN_MENU_ITEM_5_DESC
274
+#define MORE_CUSTOM6_TEXT_SP  MAIN_MENU_ITEM_6_DESC

+ 6
- 6
Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h Datei anzeigen

@@ -493,9 +493,9 @@
493 493
 #define EEPROM_READ_TIPS_T_CN         "是否使用EEPROM參數?"
494 494
 #define EEPROM_REVERT_TIPS_T_CN       "是否恢復默認參數?"
495 495
 
496
-#define MORE_CUSTOM1_TEXT_T_CN  USER_DESC_1
497
-#define MORE_CUSTOM2_TEXT_T_CN  USER_DESC_2
498
-#define MORE_CUSTOM3_TEXT_T_CN  USER_DESC_3
499
-#define MORE_CUSTOM4_TEXT_T_CN  USER_DESC_4
500
-#define MORE_CUSTOM5_TEXT_T_CN  USER_DESC_5
501
-#define MORE_CUSTOM6_TEXT_T_CN  USER_DESC_6
496
+#define MORE_CUSTOM1_TEXT_T_CN  MAIN_MENU_ITEM_1_DESC
497
+#define MORE_CUSTOM2_TEXT_T_CN  MAIN_MENU_ITEM_2_DESC
498
+#define MORE_CUSTOM3_TEXT_T_CN  MAIN_MENU_ITEM_3_DESC
499
+#define MORE_CUSTOM4_TEXT_T_CN  MAIN_MENU_ITEM_4_DESC
500
+#define MORE_CUSTOM5_TEXT_T_CN  MAIN_MENU_ITEM_5_DESC
501
+#define MORE_CUSTOM6_TEXT_T_CN  MAIN_MENU_ITEM_6_DESC

+ 1
- 1
Marlin/src/lcd/language/language_cz.h Datei anzeigen

@@ -119,7 +119,7 @@ namespace Language_cz {
119 119
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Index Y");
120 120
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Hodnota Z");
121 121
 
122
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Vlastní příkazy");
122
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Vlastní příkazy");
123 123
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 test sondy");
124 124
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 bod");
125 125
   PROGMEM Language_Str MSG_M48_DEVIATION                   = _UxGT("Odchylka");

+ 1
- 1
Marlin/src/lcd/language/language_de.h Datei anzeigen

@@ -112,7 +112,7 @@ namespace Language_de {
112 112
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Index X");
113 113
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Index Y");
114 114
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Z-Wert");
115
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Benutzer-Menü");
115
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Benutzer-Menü");
116 116
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 Sondentest");
117 117
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 Punkt");
118 118
   PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS               = _UxGT("Zu weit draußen");

+ 1
- 1
Marlin/src/lcd/language/language_en.h Datei anzeigen

@@ -140,7 +140,7 @@ namespace Language_en {
140 140
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Index X");
141 141
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Index Y");
142 142
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Z Value");
143
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Custom Commands");
143
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Custom Commands");
144 144
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 Probe Test");
145 145
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 Point");
146 146
   PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS               = _UxGT("Probe out of bounds");

+ 1
- 1
Marlin/src/lcd/language/language_es.h Datei anzeigen

@@ -115,7 +115,7 @@ namespace Language_es {
115 115
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Índice X");
116 116
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Índice Y");
117 117
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Valor Z");
118
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Com. Personalizados");
118
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Com. Personalizados");
119 119
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 Probar Sonda");
120 120
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 Punto");
121 121
   PROGMEM Language_Str MSG_M48_DEVIATION                   = _UxGT("Desviación");

+ 1
- 1
Marlin/src/lcd/language/language_fr.h Datei anzeigen

@@ -113,7 +113,7 @@ namespace Language_fr {
113 113
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Index X");
114 114
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Index Y");
115 115
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Valeur Z");
116
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Commandes perso");
116
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Commandes perso");
117 117
 
118 118
   PROGMEM Language_Str MSG_LCD_TILTING_MESH                = _UxGT("Mesure point");
119 119
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("Ecart sonde Z M48");

+ 1
- 1
Marlin/src/lcd/language/language_gl.h Datei anzeigen

@@ -112,7 +112,7 @@ namespace Language_gl {
112 112
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Índice X");
113 113
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Índice Y");
114 114
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Valor Z");
115
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Comandos Personaliz.");
115
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Comandos Personaliz.");
116 116
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 Probar Sonda");
117 117
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 Punto");
118 118
   PROGMEM Language_Str MSG_M48_DEVIATION                   = _UxGT("Desviación");

+ 1
- 1
Marlin/src/lcd/language/language_it.h Datei anzeigen

@@ -138,7 +138,7 @@ namespace Language_it {
138 138
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Indice X");
139 139
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Indice Y");
140 140
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Valore di Z");
141
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Comandi personaliz.");
141
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Comandi personaliz.");
142 142
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("Test sonda M48");
143 143
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("Punto M48");
144 144
   PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS               = _UxGT("Sonda oltre i limiti");

+ 1
- 1
Marlin/src/lcd/language/language_jp_kana.h Datei anzeigen

@@ -246,7 +246,7 @@ namespace Language_jp_kana {
246 246
   PROGMEM Language_Str MSG_BACK                            = _UxGT("モドリ");
247 247
   PROGMEM Language_Str MSG_VELOCITY                        = _UxGT("ソクド");
248 248
   PROGMEM Language_Str MSG_STEPS_PER_MM                    = _UxGT("ステップ/mm");
249
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("ユーザーコマンド");
249
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("ユーザーコマンド");
250 250
   PROGMEM Language_Str MSG_PRINT_PAUSED                    = _UxGT("プリントガイチジテイシサレマシタ");
251 251
   PROGMEM Language_Str MSG_PRINTING                        = _UxGT("プリントチュウ...");
252 252
 }

+ 1
- 1
Marlin/src/lcd/language/language_pl.h Datei anzeigen

@@ -109,7 +109,7 @@ namespace Language_pl {
109 109
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Indeks X");
110 110
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Indeks Y");
111 111
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Wartość Z");
112
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Własne Polecenia");
112
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Własne Polecenia");
113 113
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 Test sondy");
114 114
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 Punky");
115 115
   PROGMEM Language_Str MSG_M48_DEVIATION                   = _UxGT("Odchylenie");

+ 1
- 1
Marlin/src/lcd/language/language_pt_br.h Datei anzeigen

@@ -103,7 +103,7 @@ namespace Language_pt_br {
103 103
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Índice X");
104 104
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Índice Y");
105 105
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Valor Z");
106
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Comando customizado");
106
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Comando customizado");
107 107
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 Teste de sonda");
108 108
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 Ponto");
109 109
   PROGMEM Language_Str MSG_IDEX_MENU                       = _UxGT("Modo IDEX");

+ 1
- 1
Marlin/src/lcd/language/language_ro.h Datei anzeigen

@@ -111,7 +111,7 @@ namespace Language_ro {
111 111
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Index X");
112 112
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Index Y");
113 113
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Valoare Z");
114
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Comenzi Personalizate");
114
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Comenzi Personalizate");
115 115
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 Probe Test");
116 116
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 Point");
117 117
   PROGMEM Language_Str MSG_M48_DEVIATION                   = _UxGT("Deviation");

+ 1
- 1
Marlin/src/lcd/language/language_ru.h Datei anzeigen

@@ -139,7 +139,7 @@ namespace Language_ru {
139 139
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Индекс X");
140 140
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Индекс Y");
141 141
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Значение Z");
142
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Свои команды");
142
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Свои команды");
143 143
 
144 144
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 тест Z-зонда");
145 145
   PROGMEM Language_Str MSG_M48_DEVIATION                   = _UxGT("Отклонение");

+ 1
- 1
Marlin/src/lcd/language/language_sk.h Datei anzeigen

@@ -140,7 +140,7 @@ namespace Language_sk {
140 140
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Index X");
141 141
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Index Y");
142 142
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Hodnota Z");
143
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Vlastné príkazy");
143
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Vlastné príkazy");
144 144
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 Test sondy");
145 145
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 Bod");
146 146
   PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS               = _UxGT("Sonda mimo hraníc");

+ 1
- 1
Marlin/src/lcd/language/language_tr.h Datei anzeigen

@@ -114,7 +114,7 @@ namespace Language_tr {
114 114
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("İndeks X");
115 115
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("İndeks Y");
116 116
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Z Değeri");
117
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Özel Komutlar");
117
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Özel Komutlar");
118 118
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 Prob Testi");
119 119
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 Nokta");
120 120
   PROGMEM Language_Str MSG_M48_DEVIATION                   = _UxGT("Sapma");

+ 1
- 1
Marlin/src/lcd/language/language_uk.h Datei anzeigen

@@ -151,7 +151,7 @@ namespace Language_uk {
151 151
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Індекс X");
152 152
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Індекс Y");
153 153
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Значення Z");
154
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Власні команди");
154
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Власні команди");
155 155
 
156 156
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 тест зонду");
157 157
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 точка");

+ 1
- 1
Marlin/src/lcd/language/language_vi.h Datei anzeigen

@@ -96,7 +96,7 @@ namespace Language_vi {
96 96
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("Mục lục X");                            // Index X
97 97
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("Mục lục Y");
98 98
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Giá trị Z");                            // Z Value
99
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("Các lệnh tự chọn");                     // Custom Commands
99
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("Các lệnh tự chọn");                     // Custom Commands
100 100
   PROGMEM Language_Str MSG_UBL_DOING_G29                   = _UxGT("Đang chạy G29");                        // Doing G29
101 101
   PROGMEM Language_Str MSG_UBL_TOOLS                       = _UxGT("Công cụ UBL");                          // UBL tools
102 102
   PROGMEM Language_Str MSG_UBL_LEVEL_BED                   = _UxGT("San Lấp Bàn Thống Nhất (UBL)");         // Unified Bed Leveling

+ 1
- 1
Marlin/src/lcd/language/language_zh_CN.h Datei anzeigen

@@ -109,7 +109,7 @@ namespace Language_zh_CN {
109 109
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("索引X");
110 110
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("索引Y");
111 111
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Z 值");
112
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("定制命令");     // "Custom Commands"
112
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("定制命令");     // "Custom Commands"
113 113
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48探测");
114 114
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48点");
115 115
   PROGMEM Language_Str MSG_M48_DEVIATION                   = _UxGT("M48偏差");

+ 1
- 1
Marlin/src/lcd/language/language_zh_TW.h Datei anzeigen

@@ -107,7 +107,7 @@ namespace Language_zh_TW {
107 107
   PROGMEM Language_Str MSG_MESH_X                          = _UxGT("索引 X");    //"Index X"
108 108
   PROGMEM Language_Str MSG_MESH_Y                          = _UxGT("索引 Y");    //"Index Y"
109 109
   PROGMEM Language_Str MSG_MESH_EDIT_Z                     = _UxGT("Z 值");    //"Z Value"
110
-  PROGMEM Language_Str MSG_USER_MENU                       = _UxGT("自定命令");     // "Custom Commands"
110
+  PROGMEM Language_Str MSG_CUSTOM_COMMANDS                 = _UxGT("自定命令");     // "Custom Commands"
111 111
   PROGMEM Language_Str MSG_M48_TEST                        = _UxGT("M48 探測測試");   //"M48 Probe Test"
112 112
   PROGMEM Language_Str MSG_M48_POINT                       = _UxGT("M48 探測點");    //"M48 Point"
113 113
   PROGMEM Language_Str MSG_M48_DEVIATION                   = _UxGT("偏差");    //"Deviation"

+ 152
- 0
Marlin/src/lcd/menu/menu_configuration.cpp Datei anzeigen

@@ -338,6 +338,148 @@ void menu_advanced_settings();
338 338
 
339 339
 #endif
340 340
 
341
+#if ENABLED(CUSTOM_MENU_CONFIG)
342
+
343
+  void _lcd_custom_menus_configuration_gcode(PGM_P const cmd) {
344
+    queue.inject_P(cmd);
345
+    TERN_(CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback());
346
+    TERN_(CUSTOM_MENU_CONFIG_SCRIPT_RETURN, ui.return_to_status());
347
+  }
348
+
349
+  void custom_menus_configuration() {
350
+    START_MENU();
351
+    BACK_ITEM(MSG_MAIN);
352
+
353
+    #define HAS_CUSTOM_ITEM_CONF(N) (defined(CONFIG_MENU_ITEM_##N##_DESC) && defined(CONFIG_MENU_ITEM_##N##_GCODE))
354
+
355
+    #define CUSTOM_TEST_CONF(N) do{ \
356
+      constexpr char c = CONFIG_MENU_ITEM_##N##_GCODE[strlen(CONFIG_MENU_ITEM_##N##_GCODE) - 1]; \
357
+      static_assert(c != '\n' && c != '\r', "CONFIG_MENU_ITEM_" STRINGIFY(N) "_GCODE cannot have a newline at the end. Please remove it."); \
358
+    }while(0)
359
+
360
+    #ifdef CUSTOM_MENU_CONFIG_SCRIPT_DONE
361
+      #define _DONE_SCRIPT "\n" CUSTOM_MENU_CONFIG_SCRIPT_DONE
362
+    #else
363
+      #define _DONE_SCRIPT ""
364
+    #endif
365
+    #define GCODE_LAMBDA_CONF(N) []{ _lcd_custom_menus_configuration_gcode(PSTR(CONFIG_MENU_ITEM_##N##_GCODE _DONE_SCRIPT)); }
366
+    #define _CUSTOM_ITEM_CONF(N) ACTION_ITEM_P(PSTR(CONFIG_MENU_ITEM_##N##_DESC), GCODE_LAMBDA_CONF(N));
367
+    #define _CUSTOM_ITEM_CONF_CONFIRM(N)             \
368
+      SUBMENU_P(PSTR(CONFIG_MENU_ITEM_##N##_DESC), []{ \
369
+          MenuItem_confirm::confirm_screen(          \
370
+            GCODE_LAMBDA_CONF(N),                    \
371
+            ui.goto_previous_screen,                 \
372
+            PSTR(CONFIG_MENU_ITEM_##N##_DESC "?")      \
373
+          );                                         \
374
+        })
375
+
376
+    #define CUSTOM_ITEM_CONF(N) do{ if (ENABLED(CONFIG_MENU_ITEM_##N##_CONFIRM)) _CUSTOM_ITEM_CONF_CONFIRM(N); else _CUSTOM_ITEM_CONF(N); }while(0)
377
+
378
+    #if HAS_CUSTOM_ITEM_CONF(1)
379
+      CUSTOM_TEST_CONF(1);
380
+      CUSTOM_ITEM_CONF(1);
381
+    #endif
382
+    #if HAS_CUSTOM_ITEM_CONF(2)
383
+      CUSTOM_TEST_CONF(2);
384
+      CUSTOM_ITEM_CONF(2);
385
+    #endif
386
+    #if HAS_CUSTOM_ITEM_CONF(3)
387
+      CUSTOM_TEST_CONF(3);
388
+      CUSTOM_ITEM_CONF(3);
389
+    #endif
390
+    #if HAS_CUSTOM_ITEM_CONF(4)
391
+      CUSTOM_TEST_CONF(4);
392
+      CUSTOM_ITEM_CONF(4);
393
+    #endif
394
+    #if HAS_CUSTOM_ITEM_CONF(5)
395
+      CUSTOM_TEST_CONF(5);
396
+      CUSTOM_ITEM_CONF(5);
397
+    #endif
398
+    #if HAS_CUSTOM_ITEM_CONF(6)
399
+      CUSTOM_TEST_CONF(6);
400
+      CUSTOM_ITEM_CONF(6);
401
+    #endif
402
+    #if HAS_CUSTOM_ITEM_CONF(7)
403
+      CUSTOM_TEST_CONF(7);
404
+      CUSTOM_ITEM_CONF(7);
405
+    #endif
406
+    #if HAS_CUSTOM_ITEM_CONF(8)
407
+      CUSTOM_TEST_CONF(8);
408
+      CUSTOM_ITEM_CONF(8);
409
+    #endif
410
+    #if HAS_CUSTOM_ITEM_CONF(9)
411
+      CUSTOM_TEST_CONF(9);
412
+      CUSTOM_ITEM_CONF(9);
413
+    #endif
414
+    #if HAS_CUSTOM_ITEM_CONF(10)
415
+      CUSTOM_TEST_CONF(10);
416
+      CUSTOM_ITEM_CONF(10);
417
+    #endif
418
+    #if HAS_CUSTOM_ITEM_CONF(11)
419
+      CUSTOM_TEST_CONF(11);
420
+      CUSTOM_ITEM_CONF(11);
421
+    #endif
422
+    #if HAS_CUSTOM_ITEM_CONF(12)
423
+      CUSTOM_TEST_CONF(12);
424
+      CUSTOM_ITEM_CONF(12);
425
+    #endif
426
+    #if HAS_CUSTOM_ITEM_CONF(13)
427
+      CUSTOM_TEST_CONF(13);
428
+      CUSTOM_ITEM_CONF(13);
429
+    #endif
430
+    #if HAS_CUSTOM_ITEM_CONF(14)
431
+      CUSTOM_TEST_CONF(14);
432
+      CUSTOM_ITEM_CONF(14);
433
+    #endif
434
+    #if HAS_CUSTOM_ITEM_CONF(15)
435
+      CUSTOM_TEST_CONF(15);
436
+      CUSTOM_ITEM_CONF(15);
437
+    #endif
438
+    #if HAS_CUSTOM_ITEM_CONF(16)
439
+      CUSTOM_TEST_CONF(16);
440
+      CUSTOM_ITEM_CONF(16);
441
+    #endif
442
+    #if HAS_CUSTOM_ITEM_CONF(17)
443
+      CUSTOM_TEST_CONF(17);
444
+      CUSTOM_ITEM_CONF(17);
445
+    #endif
446
+    #if HAS_CUSTOM_ITEM_CONF(18)
447
+      CUSTOM_TEST_CONF(18);
448
+      CUSTOM_ITEM_CONF(18);
449
+    #endif
450
+    #if HAS_CUSTOM_ITEM_CONF(19)
451
+      CUSTOM_TEST_CONF(19);
452
+      CUSTOM_ITEM_CONF(19);
453
+    #endif
454
+    #if HAS_CUSTOM_ITEM_CONF(20)
455
+      CUSTOM_TEST_CONF(20);
456
+      CUSTOM_ITEM_CONF(20);
457
+    #endif
458
+    #if HAS_CUSTOM_ITEM_CONF(21)
459
+      CUSTOM_TEST_CONF(21);
460
+      CUSTOM_ITEM_CONF(21);
461
+    #endif
462
+    #if HAS_CUSTOM_ITEM_CONF(22)
463
+      CUSTOM_TEST_CONF(22);
464
+      CUSTOM_ITEM_CONF(22);
465
+    #endif
466
+    #if HAS_CUSTOM_ITEM_CONF(23)
467
+      CUSTOM_TEST_CONF(23);
468
+      CUSTOM_ITEM_CONF(23);
469
+    #endif
470
+    #if HAS_CUSTOM_ITEM_CONF(24)
471
+      CUSTOM_TEST_CONF(24);
472
+      CUSTOM_ITEM_CONF(24);
473
+    #endif
474
+    #if HAS_CUSTOM_ITEM_CONF(25)
475
+      CUSTOM_TEST_CONF(25);
476
+      CUSTOM_ITEM_CONF(25);
477
+    #endif
478
+    END_MENU();
479
+  }
480
+
481
+#endif // CUSTOM_MENU_CONFIG
482
+
341 483
 void menu_configuration() {
342 484
   const bool busy = printer_busy();
343 485
 
@@ -351,6 +493,16 @@ void menu_configuration() {
351 493
     SUBMENU(MSG_DEBUG_MENU, menu_debug);
352 494
   #endif
353 495
 
496
+  #if ENABLED(CUSTOM_MENU_CONFIG)
497
+    if (TERN1(CUSTOM_MENU_CONFIG_ONLY_IDLE, !busy)) {
498
+      #ifdef CUSTOM_MENU_CONFIG_TITLE
499
+        SUBMENU_P(PSTR(CUSTOM_MENU_CONFIG_TITLE), custom_menus_configuration);
500
+      #else
501
+        SUBMENU(MSG_CUSTOM_COMMANDS, custom_menus_configuration);
502
+      #endif
503
+    }
504
+  #endif
505
+
354 506
   SUBMENU(MSG_ADVANCED_SETTINGS, menu_advanced_settings);
355 507
 
356 508
   #if ENABLED(BABYSTEP_ZPROBE_OFFSET)

+ 0
- 141
Marlin/src/lcd/menu/menu_custom.cpp Datei anzeigen

@@ -1,141 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-//
24
-// Custom User Menu
25
-//
26
-
27
-#include "../../inc/MarlinConfigPre.h"
28
-
29
-#if BOTH(HAS_LCD_MENU, CUSTOM_USER_MENUS)
30
-
31
-#include "menu_item.h"
32
-#include "../../gcode/queue.h"
33
-
34
-#ifdef USER_SCRIPT_DONE
35
-  #define _DONE_SCRIPT "\n" USER_SCRIPT_DONE
36
-#else
37
-  #define _DONE_SCRIPT ""
38
-#endif
39
-
40
-void _lcd_user_gcode(PGM_P const cmd) {
41
-  queue.inject_P(cmd);
42
-  TERN_(USER_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback());
43
-  TERN_(USER_SCRIPT_RETURN, ui.return_to_status());
44
-}
45
-
46
-void menu_user() {
47
-  START_MENU();
48
-  BACK_ITEM(MSG_MAIN);
49
-
50
-  #define GCODE_LAMBDA(N) []{ _lcd_user_gcode(PSTR(USER_GCODE_##N _DONE_SCRIPT)); }
51
-  #define _USER_ITEM(N) ACTION_ITEM_P(PSTR(USER_DESC_##N), GCODE_LAMBDA(N));
52
-  #define _USER_ITEM_CONFIRM(N)           \
53
-    SUBMENU_P(PSTR(USER_DESC_##N), []{    \
54
-        MenuItem_confirm::confirm_screen( \
55
-          GCODE_LAMBDA(N),                \
56
-          ui.goto_previous_screen,        \
57
-          PSTR(USER_DESC_##N "?")         \
58
-        );                                \
59
-      })
60
-
61
-  #define USER_ITEM(N) do{ if (ENABLED(USER_CONFIRM_##N)) _USER_ITEM_CONFIRM(N); else _USER_ITEM(N); }while(0)
62
-
63
-  #if HAS_USER_ITEM(1)
64
-    USER_ITEM(1);
65
-  #endif
66
-  #if HAS_USER_ITEM(2)
67
-    USER_ITEM(2);
68
-  #endif
69
-  #if HAS_USER_ITEM(3)
70
-    USER_ITEM(3);
71
-  #endif
72
-  #if HAS_USER_ITEM(4)
73
-    USER_ITEM(4);
74
-  #endif
75
-  #if HAS_USER_ITEM(5)
76
-    USER_ITEM(5);
77
-  #endif
78
-  #if HAS_USER_ITEM(6)
79
-    USER_ITEM(6);
80
-  #endif
81
-  #if HAS_USER_ITEM(7)
82
-    USER_ITEM(7);
83
-  #endif
84
-  #if HAS_USER_ITEM(8)
85
-    USER_ITEM(8);
86
-  #endif
87
-  #if HAS_USER_ITEM(9)
88
-    USER_ITEM(9);
89
-  #endif
90
-  #if HAS_USER_ITEM(10)
91
-    USER_ITEM(10);
92
-  #endif
93
-  #if HAS_USER_ITEM(11)
94
-    USER_ITEM(11);
95
-  #endif
96
-  #if HAS_USER_ITEM(12)
97
-    USER_ITEM(12);
98
-  #endif
99
-  #if HAS_USER_ITEM(13)
100
-    USER_ITEM(13);
101
-  #endif
102
-  #if HAS_USER_ITEM(14)
103
-    USER_ITEM(14);
104
-  #endif
105
-  #if HAS_USER_ITEM(15)
106
-    USER_ITEM(15);
107
-  #endif
108
-  #if HAS_USER_ITEM(16)
109
-    USER_ITEM(16);
110
-  #endif
111
-  #if HAS_USER_ITEM(17)
112
-    USER_ITEM(17);
113
-  #endif
114
-  #if HAS_USER_ITEM(18)
115
-    USER_ITEM(18);
116
-  #endif
117
-  #if HAS_USER_ITEM(19)
118
-    USER_ITEM(19);
119
-  #endif
120
-  #if HAS_USER_ITEM(20)
121
-    USER_ITEM(20);
122
-  #endif
123
-  #if HAS_USER_ITEM(21)
124
-    USER_ITEM(21);
125
-  #endif
126
-  #if HAS_USER_ITEM(22)
127
-    USER_ITEM(22);
128
-  #endif
129
-  #if HAS_USER_ITEM(23)
130
-    USER_ITEM(23);
131
-  #endif
132
-  #if HAS_USER_ITEM(24)
133
-    USER_ITEM(24);
134
-  #endif
135
-  #if HAS_USER_ITEM(25)
136
-    USER_ITEM(25);
137
-  #endif
138
-  END_MENU();
139
-}
140
-
141
-#endif // HAS_LCD_MENU && CUSTOM_USER_MENUS

+ 147
- 9
Marlin/src/lcd/menu/menu_main.cpp Datei anzeigen

@@ -68,10 +68,6 @@ void menu_motion();
68 68
 void menu_temperature();
69 69
 void menu_configuration();
70 70
 
71
-#if ENABLED(CUSTOM_USER_MENUS)
72
-  void menu_user();
73
-#endif
74
-
75 71
 #if HAS_POWER_MONITOR
76 72
   void menu_power_monitor();
77 73
 #endif
@@ -105,6 +101,148 @@ void menu_configuration();
105 101
   void menu_language();
106 102
 #endif
107 103
 
104
+#if ENABLED(CUSTOM_MENU_MAIN)
105
+
106
+  void _lcd_custom_menu_main_gcode(PGM_P const cmd) {
107
+    queue.inject_P(cmd);
108
+    TERN_(MAIN_MENU_ITEM_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback());
109
+    TERN_(MAIN_MENU_ITEM_SCRIPT_RETURN, ui.return_to_status());
110
+  }
111
+
112
+  void custom_menus_main() {
113
+    START_MENU();
114
+    BACK_ITEM(MSG_MAIN);
115
+
116
+    #define HAS_CUSTOM_ITEM_MAIN(N) (defined(MAIN_MENU_ITEM_##N##_DESC) && defined(MAIN_MENU_ITEM_##N##_GCODE))
117
+
118
+    #define CUSTOM_TEST_MAIN(N) do{ \
119
+      constexpr char c = MAIN_MENU_ITEM_##N##_GCODE[strlen(MAIN_MENU_ITEM_##N##_GCODE) - 1]; \
120
+      static_assert(c != '\n' && c != '\r', "MAIN_MENU_ITEM_" STRINGIFY(N) "_GCODE cannot have a newline at the end. Please remove it."); \
121
+    }while(0)
122
+
123
+    #ifdef MAIN_MENU_ITEM_SCRIPT_DONE
124
+      #define _DONE_SCRIPT "\n" MAIN_MENU_ITEM_SCRIPT_DONE
125
+    #else
126
+      #define _DONE_SCRIPT ""
127
+    #endif
128
+    #define GCODE_LAMBDA_MAIN(N) []{ _lcd_custom_menu_main_gcode(PSTR(MAIN_MENU_ITEM_##N##_GCODE _DONE_SCRIPT)); }
129
+    #define _CUSTOM_ITEM_MAIN(N) ACTION_ITEM_P(PSTR(MAIN_MENU_ITEM_##N##_DESC), GCODE_LAMBDA_MAIN(N));
130
+    #define _CUSTOM_ITEM_MAIN_CONFIRM(N)             \
131
+      SUBMENU_P(PSTR(MAIN_MENU_ITEM_##N##_DESC), []{ \
132
+          MenuItem_confirm::confirm_screen(          \
133
+            GCODE_LAMBDA_MAIN(N),                    \
134
+            ui.goto_previous_screen,                 \
135
+            PSTR(MAIN_MENU_ITEM_##N##_DESC "?")      \
136
+          );                                         \
137
+        })
138
+
139
+    #define CUSTOM_ITEM_MAIN(N) do{ if (ENABLED(MAIN_MENU_ITEM_##N##_CONFIRM)) _CUSTOM_ITEM_MAIN_CONFIRM(N); else _CUSTOM_ITEM_MAIN(N); }while(0)
140
+
141
+    #if HAS_CUSTOM_ITEM_MAIN(1)
142
+      CUSTOM_TEST_MAIN(1);
143
+      CUSTOM_ITEM_MAIN(1);
144
+    #endif
145
+    #if HAS_CUSTOM_ITEM_MAIN(2)
146
+      CUSTOM_TEST_MAIN(2);
147
+      CUSTOM_ITEM_MAIN(2);
148
+    #endif
149
+    #if HAS_CUSTOM_ITEM_MAIN(3)
150
+      CUSTOM_TEST_MAIN(3);
151
+      CUSTOM_ITEM_MAIN(3);
152
+    #endif
153
+    #if HAS_CUSTOM_ITEM_MAIN(4)
154
+      CUSTOM_TEST_MAIN(4);
155
+      CUSTOM_ITEM_MAIN(4);
156
+    #endif
157
+    #if HAS_CUSTOM_ITEM_MAIN(5)
158
+      CUSTOM_TEST_MAIN(5);
159
+      CUSTOM_ITEM_MAIN(5);
160
+    #endif
161
+    #if HAS_CUSTOM_ITEM_MAIN(6)
162
+      CUSTOM_TEST_MAIN(6);
163
+      CUSTOM_ITEM_MAIN(6);
164
+    #endif
165
+    #if HAS_CUSTOM_ITEM_MAIN(7)
166
+      CUSTOM_TEST_MAIN(7);
167
+      CUSTOM_ITEM_MAIN(7);
168
+    #endif
169
+    #if HAS_CUSTOM_ITEM_MAIN(8)
170
+      CUSTOM_TEST_MAIN(8);
171
+      CUSTOM_ITEM_MAIN(8);
172
+    #endif
173
+    #if HAS_CUSTOM_ITEM_MAIN(9)
174
+      CUSTOM_TEST_MAIN(9);
175
+      CUSTOM_ITEM_MAIN(9);
176
+    #endif
177
+    #if HAS_CUSTOM_ITEM_MAIN(10)
178
+      CUSTOM_TEST_MAIN(10);
179
+      CUSTOM_ITEM_MAIN(10);
180
+    #endif
181
+    #if HAS_CUSTOM_ITEM_MAIN(11)
182
+      CUSTOM_TEST_MAIN(11);
183
+      CUSTOM_ITEM_MAIN(11);
184
+    #endif
185
+    #if HAS_CUSTOM_ITEM_MAIN(12)
186
+      CUSTOM_TEST_MAIN(12);
187
+      CUSTOM_ITEM_MAIN(12);
188
+    #endif
189
+    #if HAS_CUSTOM_ITEM_MAIN(13)
190
+      CUSTOM_TEST_MAIN(13);
191
+      CUSTOM_ITEM_MAIN(13);
192
+    #endif
193
+    #if HAS_CUSTOM_ITEM_MAIN(14)
194
+      CUSTOM_TEST_MAIN(14);
195
+      CUSTOM_ITEM_MAIN(14);
196
+    #endif
197
+    #if HAS_CUSTOM_ITEM_MAIN(15)
198
+      CUSTOM_TEST_MAIN(15);
199
+      CUSTOM_ITEM_MAIN(15);
200
+    #endif
201
+    #if HAS_CUSTOM_ITEM_MAIN(16)
202
+      CUSTOM_TEST_MAIN(16);
203
+      CUSTOM_ITEM_MAIN(16);
204
+    #endif
205
+    #if HAS_CUSTOM_ITEM_MAIN(17)
206
+      CUSTOM_TEST_MAIN(17);
207
+      CUSTOM_ITEM_MAIN(17);
208
+    #endif
209
+    #if HAS_CUSTOM_ITEM_MAIN(18)
210
+      CUSTOM_TEST_MAIN(18);
211
+      CUSTOM_ITEM_MAIN(18);
212
+    #endif
213
+    #if HAS_CUSTOM_ITEM_MAIN(19)
214
+      CUSTOM_TEST_MAIN(19);
215
+      CUSTOM_ITEM_MAIN(19);
216
+    #endif
217
+    #if HAS_CUSTOM_ITEM_MAIN(20)
218
+      CUSTOM_TEST_MAIN(20);
219
+      CUSTOM_ITEM_MAIN(20);
220
+    #endif
221
+    #if HAS_CUSTOM_ITEM_MAIN(21)
222
+      CUSTOM_TEST_MAIN(21);
223
+      CUSTOM_ITEM_MAIN(21);
224
+    #endif
225
+    #if HAS_CUSTOM_ITEM_MAIN(22)
226
+      CUSTOM_TEST_MAIN(22);
227
+      CUSTOM_ITEM_MAIN(22);
228
+    #endif
229
+    #if HAS_CUSTOM_ITEM_MAIN(23)
230
+      CUSTOM_TEST_MAIN(23);
231
+      CUSTOM_ITEM_MAIN(23);
232
+    #endif
233
+    #if HAS_CUSTOM_ITEM_MAIN(24)
234
+      CUSTOM_TEST_MAIN(24);
235
+      CUSTOM_ITEM_MAIN(24);
236
+    #endif
237
+    #if HAS_CUSTOM_ITEM_MAIN(25)
238
+      CUSTOM_TEST_MAIN(25);
239
+      CUSTOM_ITEM_MAIN(25);
240
+    #endif
241
+    END_MENU();
242
+  }
243
+
244
+#endif // CUSTOM_MENU_MAIN
245
+
108 246
 void menu_main() {
109 247
   const bool busy = printingIsActive()
110 248
     #if ENABLED(SDSUPPORT)
@@ -210,12 +348,12 @@ void menu_main() {
210 348
 
211 349
   SUBMENU(MSG_CONFIGURATION, menu_configuration);
212 350
 
213
-  #if ENABLED(CUSTOM_USER_MENUS)
214
-    if (TERN1(CUSTOM_MENU_ONLY_IDLE, !busy)) {
215
-      #ifdef CUSTOM_USER_MENU_TITLE
216
-        SUBMENU_P(PSTR(CUSTOM_USER_MENU_TITLE), menu_user);
351
+  #if ENABLED(CUSTOM_MENU_MAIN)
352
+    if (TERN1(CUSTOM_MENU_MAIN_ONLY_IDLE, !busy)) {
353
+      #ifdef CUSTOM_MENU_MAIN_TITLE
354
+        SUBMENU_P(PSTR(CUSTOM_MENU_MAIN_TITLE), custom_menus_main);
217 355
       #else
218
-        SUBMENU(MSG_USER_MENU, menu_user);
356
+        SUBMENU(MSG_CUSTOM_COMMANDS, custom_menus_main);
219 357
       #endif
220 358
     }
221 359
   #endif

+ 0
- 3
buildroot/share/PlatformIO/scripts/common-dependencies.h Datei anzeigen

@@ -67,9 +67,6 @@
67 67
   #if ENABLED(CANCEL_OBJECTS)
68 68
     #define HAS_MENU_CANCELOBJECT
69 69
   #endif
70
-  #if ENABLED(CUSTOM_USER_MENUS)
71
-    #define HAS_MENU_CUSTOM
72
-  #endif
73 70
   #if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION)
74 71
     #define HAS_MENU_DELTA_CALIBRATE
75 72
   #endif

+ 2
- 2
buildroot/tests/mega2560 Datei anzeigen

@@ -21,7 +21,7 @@ opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO LCD_LANGUAGE fr \
21 21
 opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT SKEW_CORRECTION \
22 22
            REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI STATUS_MESSAGE_SCROLLING SHOW_CUSTOM_BOOTSCREEN BOOT_MARLIN_LOGO_SMALL \
23 23
            SDSUPPORT SDCARD_SORT_ALPHA USB_FLASH_DRIVE_SUPPORT AUTO_REPORT_SD_STATUS SCROLL_LONG_FILENAMES CANCEL_OBJECTS SOUND_MENU_ITEM \
24
-           EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_USER_MENUS \
24
+           EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_MENU_MAIN \
25 25
            MULTI_NOZZLE_DUPLICATION CLASSIC_JERK LIN_ADVANCE EXTRA_LIN_ADVANCE_K QUICK_HOME \
26 26
            LCD_SET_PROGRESS_MANUALLY PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME \
27 27
            BABYSTEPPING BABYSTEP_XY NANODLP_Z_SYNC I2C_POSITION_ENCODERS M114_DETAIL
@@ -37,7 +37,7 @@ opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI SHOW_CUS
37 37
            LCD_SET_PROGRESS_MANUALLY PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES \
38 38
            SDSUPPORT SDCARD_SORT_ALPHA NO_SD_AUTOSTART USB_FLASH_DRIVE_SUPPORT CANCEL_OBJECTS \
39 39
            Z_PROBE_SLED AUTO_BED_LEVELING_UBL UBL_HILBERT_CURVE RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT \
40
-           EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_USER_MENUS \
40
+           EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_MENU_MAIN \
41 41
            MULTI_NOZZLE_DUPLICATION CLASSIC_JERK LIN_ADVANCE QUICK_HOME \
42 42
            NANODLP_Z_SYNC I2C_POSITION_ENCODERS M114_DETAIL \
43 43
            SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \

Laden…
Abbrechen
Speichern