|
|
@ -283,10 +283,10 @@ static void lcd_status_screen() {
|
|
|
|
#if PROGRESS_MSG_EXPIRE > 0
|
|
|
|
#if PROGRESS_MSG_EXPIRE > 0
|
|
|
|
// Handle message expire
|
|
|
|
// Handle message expire
|
|
|
|
if (expire_status_ms > 0) {
|
|
|
|
if (expire_status_ms > 0) {
|
|
|
|
|
|
|
|
#if ENABLED(SDSUPPORT)
|
|
|
|
if (card.isFileOpen()) {
|
|
|
|
if (card.isFileOpen()) {
|
|
|
|
// Expire the message when printing is active
|
|
|
|
// Expire the message when printing is active
|
|
|
|
if (IS_SD_PRINTING) {
|
|
|
|
if (IS_SD_PRINTING) {
|
|
|
|
// Expire the message when printing is active
|
|
|
|
|
|
|
|
if (ms >= expire_status_ms) {
|
|
|
|
if (ms >= expire_status_ms) {
|
|
|
|
lcd_status_message[0] = '\0';
|
|
|
|
lcd_status_message[0] = '\0';
|
|
|
|
expire_status_ms = 0;
|
|
|
|
expire_status_ms = 0;
|
|
|
@ -299,6 +299,9 @@ static void lcd_status_screen() {
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
expire_status_ms = 0;
|
|
|
|
expire_status_ms = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
expire_status_ms = 0;
|
|
|
|
|
|
|
|
#endif //SDSUPPORT
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif //LCD_PROGRESS_BAR
|
|
|
|
#endif //LCD_PROGRESS_BAR
|
|
|
@ -367,6 +370,8 @@ static void lcd_status_screen() {
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_return_to_status() { lcd_goto_menu(lcd_status_screen); }
|
|
|
|
static void lcd_return_to_status() { lcd_goto_menu(lcd_status_screen); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(SDSUPPORT)
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_sdcard_pause() { card.pauseSDPrint(); }
|
|
|
|
static void lcd_sdcard_pause() { card.pauseSDPrint(); }
|
|
|
|
|
|
|
|
|
|
|
|
static void lcd_sdcard_resume() { card.startFileprint(); }
|
|
|
|
static void lcd_sdcard_resume() { card.startFileprint(); }
|
|
|
@ -380,6 +385,8 @@ static void lcd_sdcard_stop() {
|
|
|
|
lcd_setstatus(MSG_PRINT_ABORTED, true);
|
|
|
|
lcd_setstatus(MSG_PRINT_ABORTED, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //SDSUPPORT
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* "Main" menu
|
|
|
|
* "Main" menu
|
|
|
@ -1186,6 +1193,8 @@ static void lcd_control_volumetric_menu() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // FWRETRACT
|
|
|
|
#endif // FWRETRACT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(SDSUPPORT)
|
|
|
|
|
|
|
|
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
#if !PIN_EXISTS(SD_DETECT)
|
|
|
|
static void lcd_sd_refresh() {
|
|
|
|
static void lcd_sd_refresh() {
|
|
|
|
card.initsd();
|
|
|
|
card.initsd();
|
|
|
@ -1238,6 +1247,8 @@ void lcd_sdcard_menu() {
|
|
|
|
END_MENU();
|
|
|
|
END_MENU();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //SDSUPPORT
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Functions for editing single values
|
|
|
|
* Functions for editing single values
|
|
|
@ -1389,10 +1400,16 @@ static void menu_action_sdfile(const char* filename, char* longFilename) {
|
|
|
|
enqueuecommands_P(PSTR("M24"));
|
|
|
|
enqueuecommands_P(PSTR("M24"));
|
|
|
|
lcd_return_to_status();
|
|
|
|
lcd_return_to_status();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(SDSUPPORT)
|
|
|
|
|
|
|
|
|
|
|
|
static void menu_action_sddirectory(const char* filename, char* longFilename) {
|
|
|
|
static void menu_action_sddirectory(const char* filename, char* longFilename) {
|
|
|
|
card.chdir(filename);
|
|
|
|
card.chdir(filename);
|
|
|
|
encoderPosition = 0;
|
|
|
|
encoderPosition = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
static void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { *ptr = !(*ptr); }
|
|
|
|
static void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { *ptr = !(*ptr); }
|
|
|
|
static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callback) {
|
|
|
|
static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callback) {
|
|
|
|
menu_action_setting_edit_bool(pstr, ptr);
|
|
|
|
menu_action_setting_edit_bool(pstr, ptr);
|
|
|
@ -1496,7 +1513,8 @@ void lcd_update() {
|
|
|
|
|
|
|
|
|
|
|
|
lcd_buttons_update();
|
|
|
|
lcd_buttons_update();
|
|
|
|
|
|
|
|
|
|
|
|
#if PIN_EXISTS(SD_DETECT)
|
|
|
|
#if ENABLED(SDSUPPORT) && 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;
|
|
|
@ -1515,7 +1533,8 @@ void lcd_update() {
|
|
|
|
LCD_MESSAGEPGM(MSG_SD_REMOVED);
|
|
|
|
LCD_MESSAGEPGM(MSG_SD_REMOVED);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif//CARDINSERTED
|
|
|
|
|
|
|
|
|
|
|
|
#endif //SDSUPPORT && SD_DETECT_PIN
|
|
|
|
|
|
|
|
|
|
|
|
millis_t ms = millis();
|
|
|
|
millis_t ms = millis();
|
|
|
|
if (ms > next_lcd_update_ms) {
|
|
|
|
if (ms > next_lcd_update_ms) {
|
|
|
|