diff --git a/Firmware/messages.c b/Firmware/messages.c index 7943d220..029cf0c6 100644 --- a/Firmware/messages.c +++ b/Firmware/messages.c @@ -52,6 +52,7 @@ const char MSG_LOAD_FILAMENT[] PROGMEM_I1 = ISTR("Load filament"); ////c=17 r=0 const char MSG_LOADING_FILAMENT[] PROGMEM_I1 = ISTR("Loading filament"); ////c=20 r=0 const char MSG_M117_V2_CALIBRATION[] PROGMEM_I1 = ISTR("M117 First layer cal."); ////c=25 r=1 const char MSG_MAIN[] PROGMEM_I1 = ISTR("Main"); ////c=0 r=0 +const char MSG_BACK[] PROGMEM_I1 = ISTR("Back"); ////c=0 r=0 const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1[] PROGMEM_I1 = ISTR("Measuring reference height of calibration point"); ////c=60 r=0 const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2[] PROGMEM_I1 = ISTR(" of 9"); ////c=14 r=0 const char MSG_MENU_CALIBRATION[] PROGMEM_I1 = ISTR("Calibration"); ////c=0 r=0 diff --git a/Firmware/messages.h b/Firmware/messages.h index ce6ecdd7..5083b26d 100644 --- a/Firmware/messages.h +++ b/Firmware/messages.h @@ -53,6 +53,7 @@ extern const char MSG_LOAD_FILAMENT[]; extern const char MSG_LOADING_FILAMENT[]; extern const char MSG_M117_V2_CALIBRATION[]; extern const char MSG_MAIN[]; +extern const char MSG_BACK[]; extern const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1[]; extern const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2[]; extern const char MSG_MENU_CALIBRATION[]; diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 2f0cb785..5dae2090 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -5292,9 +5292,9 @@ do\ EEPROM_read(EEPROM_SD_SORT, (uint8_t*)&sdSort, sizeof(sdSort));\ switch (sdSort)\ {\ - case SD_SORT_TIME: MENU_ITEM_FUNCTION_P(_i("Sort: [time]"), lcd_sort_type_set); break;/*////MSG_SORT_TIME c=17 r=1*/\ - case SD_SORT_ALPHA: MENU_ITEM_FUNCTION_P(_i("Sort: [alphabet]"), lcd_sort_type_set); break;/*////MSG_SORT_ALPHA c=17 r=1*/\ - default: MENU_ITEM_FUNCTION_P(_i("Sort: [none]"), lcd_sort_type_set);/*////MSG_SORT_NONE c=17 r=1*/\ + case SD_SORT_TIME: MENU_ITEM_FUNCTION_P(_i("Sort [time]"), lcd_sort_type_set); break;/*////MSG_SORT_TIME c=17 r=1*/\ + case SD_SORT_ALPHA: MENU_ITEM_FUNCTION_P(_i("Sort [alphabet]"), lcd_sort_type_set); break;/*////MSG_SORT_ALPHA c=17 r=1*/\ + default: MENU_ITEM_FUNCTION_P(_i("Sort [none]"), lcd_sort_type_set);/*////MSG_SORT_NONE c=17 r=1*/\ }\ }\ }\ @@ -6725,10 +6725,7 @@ void lcd_sdcard_menu() MENU_BEGIN(); - if(bMain) // i.e. default menu-item - MENU_ITEM_BACK_P(_T(MSG_MAIN)); - else // i.e. menu-item after card insertion - MENU_ITEM_FUNCTION_P(_T(MSG_WATCH),lcd_return_to_status); + MENU_ITEM_BACK_P(_T(bMain?MSG_MAIN:MSG_BACK)); // i.e. default menu-item / menu-item after card insertion card.getWorkDirName(); if (card.filename[0] == '/') { @@ -8148,6 +8145,8 @@ void menu_lcd_lcdupdate_func(void) } else { + if(menu_menu==lcd_sdcard_menu) + menu_back(); card.release(); LCD_MESSAGERPGM(_i("Card removed"));////MSG_SD_REMOVED c=0 r=0 } @@ -8192,4 +8191,3 @@ void menu_lcd_lcdupdate_func(void) lcd_send_status(); if (lcd_commands_type == LCD_COMMAND_V2_CAL) lcd_commands(); } -