Minor tweak to main menu

2.0.x
Scott Lahteine 6 years ago
parent d4d1b28a06
commit e10943d0d8

@ -104,7 +104,12 @@ void menu_main() {
START_MENU();
MENU_BACK(MSG_WATCH);
const bool busy = printer_busy();
const bool busy = printer_busy(),
#if ENABLED(SDSUPPORT)
card_detected = card.isDetected(),
card_open = card_detected && card.isFileOpen()
#endif
;
if (busy) {
MENU_ITEM(function, MSG_PAUSE_PRINT, lcd_pause);
@ -122,8 +127,8 @@ void menu_main() {
if (!busy) MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart);
#endif
if (card.isDetected()) {
if (!card.isFileOpen()) {
if (card_detected) {
if (!card_open) {
MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
#if !PIN_EXISTS(SD_DETECT)
MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21")); // SD-card changed by user
@ -196,8 +201,8 @@ void menu_main() {
if (!busy) MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart);
#endif
if (card.isDetected()) {
if (!card.isFileOpen()) {
if (card_detected) {
if (!card_open) {
MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
#if !PIN_EXISTS(SD_DETECT)
MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21")); // SD-card changed by user

Loading…
Cancel
Save