Przeglądaj źródła

Tweak SD section of Main Menu

Scott Lahteine 6 lat temu
rodzic
commit
3644c940bf
1 zmienionych plików z 15 dodań i 12 usunięć
  1. 15
    12
      Marlin/src/lcd/menu/menu_main.cpp

+ 15
- 12
Marlin/src/lcd/menu/menu_main.cpp Wyświetl plik

@@ -144,28 +144,31 @@ void menu_main() {
144 144
       MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
145 145
   #endif
146 146
 
147
-  //
148
-  // Autostart
149
-  //
150
-  #if ENABLED(SDSUPPORT) && ENABLED(MENU_ADDAUTOSTART)
151
-    if (!busy)
152
-      MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart);
153
-  #endif
147
+  #if ENABLED(SDSUPPORT)
148
+
149
+    //
150
+    // Autostart
151
+    //
152
+    #if ENABLED(MENU_ADDAUTOSTART)
153
+      if (!busy)
154
+        MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart);
155
+    #endif
154 156
 
155
-#if ENABLED(SDSUPPORT)
156 157
     if (card.isDetected() && !card.isFileOpen()) {
157
-      MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
158 158
       #if !PIN_EXISTS(SD_DETECT)
159 159
         MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21"));  // SD-card changed by user
160 160
       #endif
161
+      MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
161 162
     }
162 163
     else {
163
-      MENU_ITEM(function, MSG_NO_CARD, NULL);
164 164
       #if !PIN_EXISTS(SD_DETECT)
165
-        MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually initialize the SD-card via user interface
165
+        MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually init SD-card
166 166
       #endif
167
+      MENU_ITEM(function, MSG_NO_CARD, NULL);
167 168
     }
168
-  #endif
169
+
170
+  #endif // SDSUPPORT
171
+
169 172
   END_MENU();
170 173
 }
171 174
 

Ładowanie…
Anuluj
Zapisz