Option to refresh/resort SDcard files when flashAir type is selected

This commit is contained in:
Alex Voinea 2020-03-03 15:17:50 +02:00
parent f69a68b966
commit d1968f6ff0
No known key found for this signature in database
GPG key ID: F5034E7CFCF2F973
2 changed files with 13 additions and 4 deletions

View file

@ -65,7 +65,7 @@ const char MSG_PRESS_TO_UNLOAD[] PROGMEM_I1 = ISTR("Please press the knob to unl
const char MSG_PRINT_ABORTED[] PROGMEM_I1 = ISTR("Print aborted"); ////c=20 const char MSG_PRINT_ABORTED[] PROGMEM_I1 = ISTR("Print aborted"); ////c=20
const char MSG_PULL_OUT_FILAMENT[] PROGMEM_I1 = ISTR("Please pull out filament immediately"); ////c=20 r=4 const char MSG_PULL_OUT_FILAMENT[] PROGMEM_I1 = ISTR("Please pull out filament immediately"); ////c=20 r=4
const char MSG_RECOVER_PRINT[] PROGMEM_I1 = ISTR("Blackout occurred. Recover print?"); ////c=20 r=2 const char MSG_RECOVER_PRINT[] PROGMEM_I1 = ISTR("Blackout occurred. Recover print?"); ////c=20 r=2
const char MSG_REFRESH[] PROGMEM_I1 = ISTR("\xF8" "Refresh"); //// const char MSG_REFRESH[] PROGMEM_I1 = ISTR("\x04" "Refresh"); ////
const char MSG_RESUMING_PRINT[] PROGMEM_I1 = ISTR("Resuming print"); //// const char MSG_RESUMING_PRINT[] PROGMEM_I1 = ISTR("Resuming print"); ////
const char MSG_REMOVE_STEEL_SHEET[] PROGMEM_I1 = ISTR("Please remove steel sheet from heatbed."); ////c=20 r=4 const char MSG_REMOVE_STEEL_SHEET[] PROGMEM_I1 = ISTR("Please remove steel sheet from heatbed."); ////c=20 r=4
const char MSG_SELFTEST_COOLING_FAN[] PROGMEM_I1 = ISTR("Front print fan?"); ////c=20 const char MSG_SELFTEST_COOLING_FAN[] PROGMEM_I1 = ISTR("Front print fan?"); ////c=20

View file

@ -7162,13 +7162,20 @@ static void lcd_control_temperature_menu()
} }
#if SDCARDDETECT == -1
static void lcd_sd_refresh() static void lcd_sd_refresh()
{ {
#if SDCARDDETECT == -1
card.initsd(); card.initsd();
menu_top = 0; #else
} card.presort();
#endif #endif
menu_top = 0;
lcd_encoder = 0;
lcd_scrollTimer.start();
menu_entering = 1;
}
static void lcd_sd_updir() static void lcd_sd_updir()
{ {
card.updir(); card.updir();
@ -7304,6 +7311,8 @@ void lcd_sdcard_menu()
{ {
#if SDCARDDETECT == -1 #if SDCARDDETECT == -1
MENU_ITEM_FUNCTION_P(_T(MSG_REFRESH), lcd_sd_refresh); MENU_ITEM_FUNCTION_P(_T(MSG_REFRESH), lcd_sd_refresh);
#else
if (card.ToshibaFlashAir_isEnabled()) MENU_ITEM_FUNCTION_P(_T(MSG_REFRESH), lcd_sd_refresh);
#endif #endif
} else { } else {
MENU_ITEM_FUNCTION_P(PSTR(LCD_STR_FOLDER ".."), lcd_sd_updir); MENU_ITEM_FUNCTION_P(PSTR(LCD_STR_FOLDER ".."), lcd_sd_updir);