浏览代码

Apply specific menu item types

Scott Lahteine 4 年前
父节点
当前提交
ba6c41b798
共有 1 个文件被更改,包括 11 次插入15 次删除
  1. 11
    15
      Marlin/src/lcd/menu/menu_main.cpp

+ 11
- 15
Marlin/src/lcd/menu/menu_main.cpp 查看文件

@@ -138,13 +138,11 @@ void menu_main() {
138 138
       if (card_detected) {
139 139
         if (!card_open) {
140 140
           SUBMENU(MSG_MEDIA_MENU, TERN(PASSWORD_ON_SD_PRINT_MENU, password.media_gatekeeper, menu_media));
141
-          MENU_ITEM(gcode,
142
-            #if PIN_EXISTS(SD_DETECT)
143
-              MSG_CHANGE_MEDIA, M21_STR
144
-            #else
145
-              MSG_RELEASE_MEDIA, PSTR("M22")
146
-            #endif
147
-          );
141
+          #if PIN_EXISTS(SD_DETECT)
142
+            GCODES_ITEM(MSG_CHANGE_MEDIA, M21_STR);
143
+          #else
144
+            GCODES_ITEM(MSG_RELEASE_MEDIA, PSTR("M22"));
145
+          #endif
148 146
         }
149 147
       }
150 148
       else {
@@ -172,7 +170,7 @@ void menu_main() {
172 170
   #endif
173 171
 
174 172
   #if HAS_POWER_MONITOR
175
-    MENU_ITEM(submenu, MSG_POWER_MONITOR, menu_power_monitor);
173
+    SUBMENU(MSG_POWER_MONITOR, menu_power_monitor);
176 174
   #endif
177 175
 
178 176
   #if ENABLED(MIXING_EXTRUDER)
@@ -237,13 +235,11 @@ void menu_main() {
237 235
 
238 236
       if (card_detected) {
239 237
         if (!card_open) {
240
-          MENU_ITEM(gcode,
241
-            #if PIN_EXISTS(SD_DETECT)
242
-              MSG_CHANGE_MEDIA, M21_STR
243
-            #else
244
-              MSG_RELEASE_MEDIA, PSTR("M22")
245
-            #endif
246
-          );
238
+          #if PIN_EXISTS(SD_DETECT)
239
+            GCODES_ITEM(MSG_CHANGE_MEDIA, M21_STR);
240
+          #else
241
+            GCODES_ITEM(MSG_RELEASE_MEDIA, PSTR("M22"));
242
+          #endif
247 243
           SUBMENU(MSG_MEDIA_MENU, TERN(PASSWORD_ON_SD_PRINT_MENU, password.media_gatekeeper, menu_media));
248 244
         }
249 245
       }

正在加载...
取消
保存