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