|
|
|
@ -221,7 +221,7 @@ static void lcd_status_screen();
|
|
|
|
|
millis_t next_button_update_ms;
|
|
|
|
|
uint8_t lastEncoderBits;
|
|
|
|
|
uint32_t encoderPosition;
|
|
|
|
|
#if PIN_EXISTS(SDCARDDETECT)
|
|
|
|
|
#if PIN_EXISTS(SD_DETECT)
|
|
|
|
|
bool lcd_oldcardstatus;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -411,14 +411,14 @@ static void lcd_main_menu() {
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
MENU_ITEM(submenu, MSG_CARD_MENU, lcd_sdcard_menu);
|
|
|
|
|
#if !PIN_EXISTS(SDCARDDETECT)
|
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
|
MENU_ITEM(gcode, MSG_CNG_SDCARD, PSTR("M21")); // SD-card changed by user
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
MENU_ITEM(submenu, MSG_NO_CARD, lcd_sdcard_menu);
|
|
|
|
|
#if !PIN_EXISTS(SDCARDDETECT)
|
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
|
MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually initialize the SD-card via user interface
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
@ -1156,7 +1156,7 @@ static void lcd_control_volumetric_menu() {
|
|
|
|
|
}
|
|
|
|
|
#endif // FWRETRACT
|
|
|
|
|
|
|
|
|
|
#if !PIN_EXISTS(SDCARDDETECT)
|
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
|
static void lcd_sd_refresh() {
|
|
|
|
|
card.initsd();
|
|
|
|
|
currentMenuViewOffset = 0;
|
|
|
|
@ -1180,7 +1180,7 @@ void lcd_sdcard_menu() {
|
|
|
|
|
MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
|
|
|
|
|
card.getWorkDirName();
|
|
|
|
|
if (card.filename[0] == '/') {
|
|
|
|
|
#if !PIN_EXISTS(SDCARDDETECT)
|
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
|
MENU_ITEM(function, LCD_STR_REFRESH MSG_REFRESH, lcd_sd_refresh);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
@ -1407,9 +1407,9 @@ void lcd_init() {
|
|
|
|
|
#endif // SR_LCD_2W_NL
|
|
|
|
|
#endif//!NEWPANEL
|
|
|
|
|
|
|
|
|
|
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SDCARDDETECT)
|
|
|
|
|
pinMode(SDCARDDETECT_PIN, INPUT);
|
|
|
|
|
WRITE(SDCARDDETECT_PIN, HIGH);
|
|
|
|
|
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
|
|
|
|
|
pinMode(SD_DETECT_PIN, INPUT);
|
|
|
|
|
WRITE(SD_DETECT_PIN, HIGH);
|
|
|
|
|
lcd_oldcardstatus = IS_SD_INSERTED;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -1466,7 +1466,7 @@ void lcd_update() {
|
|
|
|
|
|
|
|
|
|
lcd_buttons_update();
|
|
|
|
|
|
|
|
|
|
#if PIN_EXISTS(SDCARDDETECT)
|
|
|
|
|
#if PIN_EXISTS(SD_DETECT)
|
|
|
|
|
if (IS_SD_INSERTED != lcd_oldcardstatus && lcd_detected()) {
|
|
|
|
|
lcdDrawUpdate = 2;
|
|
|
|
|
lcd_oldcardstatus = IS_SD_INSERTED;
|
|
|
|
|