SD card menu enhancement

This commit is contained in:
MRprusa3d 2019-03-06 19:51:26 +01:00
parent 6fda306eab
commit 6217329d50
3 changed files with 8 additions and 8 deletions

View File

@ -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_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_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_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_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_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 const char MSG_MENU_CALIBRATION[] PROGMEM_I1 = ISTR("Calibration"); ////c=0 r=0

View File

@ -53,6 +53,7 @@ extern const char MSG_LOAD_FILAMENT[];
extern const char MSG_LOADING_FILAMENT[]; extern const char MSG_LOADING_FILAMENT[];
extern const char MSG_M117_V2_CALIBRATION[]; extern const char MSG_M117_V2_CALIBRATION[];
extern const char MSG_MAIN[]; 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_LINE1[];
extern const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2[]; extern const char MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2[];
extern const char MSG_MENU_CALIBRATION[]; extern const char MSG_MENU_CALIBRATION[];

View File

@ -5292,9 +5292,9 @@ do\
EEPROM_read(EEPROM_SD_SORT, (uint8_t*)&sdSort, sizeof(sdSort));\ EEPROM_read(EEPROM_SD_SORT, (uint8_t*)&sdSort, sizeof(sdSort));\
switch (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_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*/\ 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*/\ 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(); MENU_BEGIN();
if(bMain) // i.e. default menu-item MENU_ITEM_BACK_P(_T(bMain?MSG_MAIN:MSG_BACK)); // i.e. default menu-item / menu-item after card insertion
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);
card.getWorkDirName(); card.getWorkDirName();
if (card.filename[0] == '/') if (card.filename[0] == '/')
{ {
@ -8148,6 +8145,8 @@ void menu_lcd_lcdupdate_func(void)
} }
else else
{ {
if(menu_menu==lcd_sdcard_menu)
menu_back();
card.release(); card.release();
LCD_MESSAGERPGM(_i("Card removed"));////MSG_SD_REMOVED c=0 r=0 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(); lcd_send_status();
if (lcd_commands_type == LCD_COMMAND_V2_CAL) lcd_commands(); if (lcd_commands_type == LCD_COMMAND_V2_CAL) lcd_commands();
} }