1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 12:04:19 +00:00

🚸 Attach USB media (#25120)

This commit is contained in:
Vovodroid 2023-01-06 00:48:22 +02:00 committed by Scott Lahteine
parent 9383c2aa76
commit a286daf697
2 changed files with 22 additions and 5 deletions

View File

@ -554,7 +554,12 @@ namespace Language_en {
LSTR MSG_FILAMENTUNLOAD = _UxGT("Unload Filament");
LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Unload *");
LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Unload All");
LSTR MSG_ATTACH_MEDIA = _UxGT("Attach ") MEDIA_TYPE_EN;
#if ENABLED(MULTI_VOLUME)
LSTR MSG_ATTACH_MEDIA = _UxGT("Attach SD Card");
LSTR MSG_ATTACH_USB_MEDIA = _UxGT("Attach USB Drive");
#else
LSTR MSG_ATTACH_MEDIA = _UxGT("Attach ") MEDIA_TYPE_EN;
#endif
LSTR MSG_CHANGE_MEDIA = _UxGT("Change ") MEDIA_TYPE_EN;
LSTR MSG_RELEASE_MEDIA = _UxGT("Release ") MEDIA_TYPE_EN;
LSTR MSG_ZPROBE_OUT = _UxGT("Z Probe Past Bed");

View File

@ -282,7 +282,10 @@ void menu_main() {
if (card_detected) {
if (!card_open) {
#if HAS_SD_DETECT
GCODES_ITEM(MSG_CHANGE_MEDIA, F("M21")); // M21 Change Media
GCODES_ITEM(MSG_CHANGE_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Change Media
#if ENABLED(MULTI_VOLUME)
GCODES_ITEM(MSG_ATTACH_USB_MEDIA, F("M21U")); // M21 Attach USB Media
#endif
#else // - or -
ACTION_ITEM(MSG_RELEASE_MEDIA, []{ // M22 Release Media
queue.inject(F("M22"));
@ -300,7 +303,10 @@ void menu_main() {
#if HAS_SD_DETECT
ACTION_ITEM(MSG_NO_MEDIA, nullptr); // "No Media"
#else
GCODES_ITEM(MSG_ATTACH_MEDIA, F("M21")); // M21 Attach Media
GCODES_ITEM(MSG_ATTACH_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Attach Media
#if ENABLED(MULTI_VOLUME)
GCODES_ITEM(MSG_ATTACH_USB_MEDIA, F("M21U")); // M21 Attach USB Media
#endif
#endif
}
// END MEDIA MENU
@ -391,7 +397,10 @@ void menu_main() {
if (card_detected) {
if (!card_open) {
#if HAS_SD_DETECT
GCODES_ITEM(MSG_CHANGE_MEDIA, F("M21")); // M21 Change Media
GCODES_ITEM(MSG_CHANGE_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Change Media
#if ENABLED(MULTI_VOLUME)
GCODES_ITEM(MSG_ATTACH_USB_MEDIA, F("M21U")); // M21 Attach USB Media
#endif
#else // - or -
ACTION_ITEM(MSG_RELEASE_MEDIA, []{ // M22 Release Media
queue.inject(F("M22"));
@ -409,7 +418,10 @@ void menu_main() {
#if HAS_SD_DETECT
ACTION_ITEM(MSG_NO_MEDIA, nullptr); // "No Media"
#else
GCODES_ITEM(MSG_ATTACH_MEDIA, F("M21")); // M21 Attach Media
GCODES_ITEM(MSG_ATTACH_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Attach Media
#if ENABLED(MULTI_VOLUME)
GCODES_ITEM(MSG_ATTACH_USB_MEDIA, F("M21U")); // M21 Attach USB Media
#endif
#endif
}
// END MEDIA MENU