|
|
@ -178,16 +178,22 @@ void menu_main() {
|
|
|
|
if (card_detected) {
|
|
|
|
if (card_detected) {
|
|
|
|
if (!card_open) {
|
|
|
|
if (!card_open) {
|
|
|
|
MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
|
|
|
|
MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
MENU_ITEM(gcode,
|
|
|
|
MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21")); // SD-card changed by user
|
|
|
|
#if PIN_EXISTS(SD_DETECT)
|
|
|
|
|
|
|
|
MSG_CHANGE_SDCARD, PSTR("M21")
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
MSG_RELEASE_SDCARD, PSTR("M22")
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
#if PIN_EXISTS(SD_DETECT)
|
|
|
|
MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually init SD-card
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
MENU_ITEM(function, MSG_NO_CARD, NULL);
|
|
|
|
MENU_ITEM(function, MSG_NO_CARD, NULL);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21"));
|
|
|
|
|
|
|
|
MENU_ITEM(function, MSG_SD_RELEASED, NULL);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // !HAS_ENCODER_WHEEL && SDSUPPORT
|
|
|
|
#endif // !HAS_ENCODER_WHEEL && SDSUPPORT
|
|
|
|
|
|
|
|
|
|
|
@ -259,16 +265,22 @@ void menu_main() {
|
|
|
|
if (card_detected) {
|
|
|
|
if (card_detected) {
|
|
|
|
if (!card_open) {
|
|
|
|
if (!card_open) {
|
|
|
|
MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
|
|
|
|
MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
MENU_ITEM(gcode,
|
|
|
|
MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21")); // SD-card changed by user
|
|
|
|
#if PIN_EXISTS(SD_DETECT)
|
|
|
|
|
|
|
|
MSG_CHANGE_SDCARD, PSTR("M21")
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
MSG_RELEASE_SDCARD, PSTR("M22")
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
#if PIN_EXISTS(SD_DETECT)
|
|
|
|
MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually init SD-card
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
MENU_ITEM(function, MSG_NO_CARD, NULL);
|
|
|
|
MENU_ITEM(function, MSG_NO_CARD, NULL);
|
|
|
|
|
|
|
|
#elif
|
|
|
|
|
|
|
|
MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21"));
|
|
|
|
|
|
|
|
MENU_ITEM(function, MSG_SD_RELEASED, NULL);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // HAS_ENCODER_WHEEL && SDSUPPORT
|
|
|
|
#endif // HAS_ENCODER_WHEEL && SDSUPPORT
|
|
|
|
|
|
|
|
|
|
|
|