Show the appropriate pause message (#12348)

This commit is contained in:
Scott Lahteine 2018-11-06 04:13:48 -06:00 committed by GitHub
parent 8517d5f915
commit 4c5ca89d8c
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 180 additions and 227 deletions

View file

@ -202,10 +202,13 @@
#define MSG_FILAMENT_CHANGE_HEAT "Press button (or M108) to heat nozzle" #define MSG_FILAMENT_CHANGE_HEAT "Press button (or M108) to heat nozzle"
#define MSG_FILAMENT_CHANGE_INSERT "Insert filament and press button (or M108)" #define MSG_FILAMENT_CHANGE_INSERT "Insert filament and press button (or M108)"
#define MSG_FILAMENT_CHANGE_WAIT "Press button (or M108) to resume"
#define MSG_FILAMENT_CHANGE_HEAT_LCD "Press button to heat nozzle" #define MSG_FILAMENT_CHANGE_HEAT_LCD "Press button to heat nozzle"
#define MSG_FILAMENT_CHANGE_INSERT_LCD "Insert filament and press button" #define MSG_FILAMENT_CHANGE_INSERT_LCD "Insert filament and press button"
#define MSG_FILAMENT_CHANGE_WAIT_LCD "Press button to resume"
#define MSG_FILAMENT_CHANGE_HEAT_M108 "Send M108 to heat nozzle" #define MSG_FILAMENT_CHANGE_HEAT_M108 "Send M108 to heat nozzle"
#define MSG_FILAMENT_CHANGE_INSERT_M108 "Insert filament and send M108" #define MSG_FILAMENT_CHANGE_INSERT_M108 "Insert filament and send M108"
#define MSG_FILAMENT_CHANGE_WAIT_M108 "Send M108 to resume"
#define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!" #define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!"

View file

@ -103,7 +103,7 @@ static bool ensure_safe_temperature(const AdvancedPauseMode mode=ADVANCED_PAUSE_
#endif #endif
#if HAS_LCD_MENU #if HAS_LCD_MENU
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT, mode); lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_HEATING, mode);
#else #else
UNUSED(mode); UNUSED(mode);
#endif #endif
@ -413,14 +413,27 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
* *
* Used by M125 and M600 * Used by M125 and M600
*/ */
void wait_for_filament_reload(const int8_t max_beep_count/*=0*/ DXC_ARGS) {
bool nozzle_timed_out = false;
#if HAS_LCD_MENU && ENABLED(EMERGENCY_PARSER)
#define _PMSG(L) L
#elif ENABLED(EMERGENCY_PARSER)
#define _PMSG(L) L##_M108
#else
#define _PMSG(L) L##_LCD
#endif
void show_continue_prompt(const bool is_reload) {
#if HAS_LCD_MENU #if HAS_LCD_MENU
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT); lcd_advanced_pause_show_message(is_reload ? ADVANCED_PAUSE_MESSAGE_INSERT : ADVANCED_PAUSE_MESSAGE_WAITING);
#endif #endif
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ERRORLNPGM(MSG_FILAMENT_CHANGE_INSERT); serialprintPGM(is_reload ? PSTR(_PMSG(MSG_FILAMENT_CHANGE_INSERT) "\n") : PSTR(_PMSG(MSG_FILAMENT_CHANGE_WAIT) "\n"));
}
void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep_count/*=0*/ DXC_ARGS) {
bool nozzle_timed_out = false;
show_continue_prompt(is_reload);
#if HAS_BUZZER #if HAS_BUZZER
filament_change_beep(max_beep_count, true); filament_change_beep(max_beep_count, true);
@ -447,24 +460,18 @@ void wait_for_filament_reload(const int8_t max_beep_count/*=0*/ DXC_ARGS) {
filament_change_beep(max_beep_count); filament_change_beep(max_beep_count);
#endif #endif
// If the nozzle has timed out, wait for the user to press the button to re-heat the nozzle, then // If the nozzle has timed out...
// re-heat the nozzle, re-show the insert screen, restart the idle timers, and start over
if (!nozzle_timed_out) if (!nozzle_timed_out)
HOTEND_LOOP() HOTEND_LOOP() nozzle_timed_out |= thermalManager.is_heater_idle(e);
nozzle_timed_out |= thermalManager.is_heater_idle(e);
// Wait for the user to press the button to re-heat the nozzle, then
// re-heat the nozzle, re-show the continue prompt, restart idle timers, start over
if (nozzle_timed_out) { if (nozzle_timed_out) {
#if HAS_LCD_MENU #if HAS_LCD_MENU
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE); lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_HEAT);
#endif #endif
SERIAL_ECHO_START(); SERIAL_ECHO_START();
#if HAS_LCD_MENU && ENABLED(EMERGENCY_PARSER) SERIAL_ECHOLNPGM(_PMSG(MSG_FILAMENT_CHANGE_HEAT));
SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_HEAT);
#elif ENABLED(EMERGENCY_PARSER)
SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_HEAT_M108);
#else
SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_HEAT_LCD);
#endif
// Wait for LCD click or M108 // Wait for LCD click or M108
while (wait_for_user) idle(true); while (wait_for_user) idle(true);
@ -475,17 +482,8 @@ void wait_for_filament_reload(const int8_t max_beep_count/*=0*/ DXC_ARGS) {
// Wait for the heaters to reach the target temperatures // Wait for the heaters to reach the target temperatures
ensure_safe_temperature(); ensure_safe_temperature();
#if HAS_LCD_MENU // Show the prompt to continue
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT); show_continue_prompt(is_reload);
#endif
SERIAL_ECHO_START();
#if HAS_LCD_MENU && ENABLED(EMERGENCY_PARSER)
SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_INSERT);
#elif ENABLED(EMERGENCY_PARSER)
SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_INSERT_M108);
#else
SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_INSERT_LCD);
#endif
// Start the heater idle timers // Start the heater idle timers
const millis_t nozzle_timeout = (millis_t)(PAUSE_PARK_NOZZLE_TIMEOUT) * 1000UL; const millis_t nozzle_timeout = (millis_t)(PAUSE_PARK_NOZZLE_TIMEOUT) * 1000UL;
@ -493,7 +491,7 @@ void wait_for_filament_reload(const int8_t max_beep_count/*=0*/ DXC_ARGS) {
HOTEND_LOOP() HOTEND_LOOP()
thermalManager.start_heater_idle_timer(e, nozzle_timeout); thermalManager.start_heater_idle_timer(e, nozzle_timeout);
wait_for_user = true; // Wait for user to load filament wait_for_user = true;
nozzle_timed_out = false; nozzle_timed_out = false;
#if HAS_BUZZER #if HAS_BUZZER

View file

@ -44,18 +44,20 @@ enum AdvancedPauseMode : char {
enum AdvancedPauseMessage : char { enum AdvancedPauseMessage : char {
ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MESSAGE_INIT,
ADVANCED_PAUSE_MESSAGE_WAITING,
ADVANCED_PAUSE_MESSAGE_UNLOAD, ADVANCED_PAUSE_MESSAGE_UNLOAD,
ADVANCED_PAUSE_MESSAGE_INSERT, ADVANCED_PAUSE_MESSAGE_INSERT,
ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MESSAGE_LOAD,
ADVANCED_PAUSE_MESSAGE_PURGE,
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE) #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE, ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE,
#else
ADVANCED_PAUSE_MESSAGE_PURGE,
#endif #endif
ADVANCED_PAUSE_MESSAGE_OPTION, ADVANCED_PAUSE_MESSAGE_OPTION,
ADVANCED_PAUSE_MESSAGE_RESUME, ADVANCED_PAUSE_MESSAGE_RESUME,
ADVANCED_PAUSE_MESSAGE_STATUS, ADVANCED_PAUSE_MESSAGE_STATUS,
ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE, ADVANCED_PAUSE_MESSAGE_HEAT,
ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT ADVANCED_PAUSE_MESSAGE_HEATING
}; };
enum AdvancedPauseMenuResponse : char { enum AdvancedPauseMenuResponse : char {
@ -84,7 +86,7 @@ void do_pause_e_move(const float &length, const float &fr);
bool pause_print(const float &retract, const point_t &park_point, const float &unload_length=0, const bool show_lcd=false DXC_PARAMS); bool pause_print(const float &retract, const point_t &park_point, const float &unload_length=0, const bool show_lcd=false DXC_PARAMS);
void wait_for_filament_reload(const int8_t max_beep_count=0 DXC_PARAMS); void wait_for_confirmation(const bool is_reload=false, const int8_t max_beep_count=0 DXC_PARAMS);
void resume_print(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, const int8_t max_beep_count=0 DXC_PARAMS); void resume_print(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, const int8_t max_beep_count=0 DXC_PARAMS);

View file

@ -71,8 +71,8 @@ void GcodeSuite::M125() {
const bool job_running = print_job_timer.isRunning(); const bool job_running = print_job_timer.isRunning();
if (pause_print(retract, park_point) && !IS_SD_PRINTING()) { if (pause_print(retract, park_point) && !IS_SD_PRINTING()) {
wait_for_filament_reload(); // Wait for lcd click or M108 wait_for_confirmation(); // Wait for lcd click or M108
resume_print(); // Return to print position and continue resume_print(); // Return to print position and continue
} }
if (job_running) print_job_timer.start(); if (job_running) print_job_timer.start();

View file

@ -131,7 +131,7 @@ void GcodeSuite::M600() {
const bool job_running = print_job_timer.isRunning(); const bool job_running = print_job_timer.isRunning();
if (pause_print(retract, park_point, unload_length, true DXC_PASS)) { if (pause_print(retract, park_point, unload_length, true DXC_PASS)) {
wait_for_filament_reload(beep_count DXC_PASS); wait_for_confirmation(true, beep_count DXC_PASS);
resume_print(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, beep_count DXC_PASS); resume_print(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, beep_count DXC_PASS);
} }

View file

@ -1097,63 +1097,70 @@
// ...or up to 2 lines on a 3-line display // ...or up to 2 lines on a 3-line display
// //
#if LCD_HEIGHT >= 4 #if LCD_HEIGHT >= 4
#ifndef MSG_FILAMENT_CHANGE_INIT_1 #ifndef MSG_ADVANCED_PAUSE_WAITING_1
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Wait for start") #define MSG_ADVANCED_PAUSE_WAITING_1 _UxGT("Press button")
#define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("of the filament") #define MSG_ADVANCED_PAUSE_WAITING_2 _UxGT("to resume print")
#define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("change")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_UNLOAD_1 #ifndef MSG_FILAMENT_CHANGE_INIT_1
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Wait for") #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Wait for")
#define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("filament unload") #define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("filament change")
#define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("to start")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_INSERT_1 #ifndef MSG_FILAMENT_CHANGE_INSERT_1
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insert filament") #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insert filament")
#define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("and press button") #define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("and press button")
#define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("to continue...") #define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("to continue")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_HEAT_1 #ifndef MSG_FILAMENT_CHANGE_HEAT_1
#define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Press button to") #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Press button")
#define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("heat nozzle.") #define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("to heat nozzle")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_HEATING_1 #ifndef MSG_FILAMENT_CHANGE_HEATING_1
#define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Heating nozzle") #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Nozzle heating")
#define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("Please wait...") #define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("Please wait...")
#endif
#ifndef MSG_FILAMENT_CHANGE_UNLOAD_1
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Wait for")
#define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("filament unload")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_LOAD_1 #ifndef MSG_FILAMENT_CHANGE_LOAD_1
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Wait for") #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Wait for")
#define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("filament load") #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("filament load")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_PURGE_1 #ifndef MSG_FILAMENT_CHANGE_PURGE_1
#define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Wait for") #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Wait for")
#define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("filament purge") #define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("filament purge")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_RESUME_1 #ifndef MSG_FILAMENT_CHANGE_RESUME_1
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Wait for print") #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Wait for print")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("to resume") #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("to resume...")
#endif #endif
#else // LCD_HEIGHT < 4 #else // LCD_HEIGHT < 4
#ifndef MSG_ADVANCED_PAUSE_WAITING_1
#define MSG_ADVANCED_PAUSE_WAITING_1 _UxGT("Click to continue")
#endif
#ifndef MSG_FILAMENT_CHANGE_INIT_1 #ifndef MSG_FILAMENT_CHANGE_INIT_1
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Please wait...") #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Please wait...")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_UNLOAD_1 #ifndef MSG_FILAMENT_CHANGE_UNLOAD_1
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Ejecting...") #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Ejecting...")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_INSERT_1 #ifndef MSG_FILAMENT_CHANGE_INSERT_1
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insert and Click") #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insert and Click")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_HEAT_1 #ifndef MSG_FILAMENT_CHANGE_HEAT_1
#define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Click to heat") #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Click to heat")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_HEATING_1 #ifndef MSG_FILAMENT_CHANGE_HEATING_1
#define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Heating...") #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Heating...")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_LOAD_1 #ifndef MSG_FILAMENT_CHANGE_LOAD_1
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Loading...") #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Loading...")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_PURGE_1 #ifndef MSG_FILAMENT_CHANGE_PURGE_1
#define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Purging...") #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Purging...")
#endif #endif
#ifndef MSG_FILAMENT_CHANGE_RESUME_1 #ifndef MSG_FILAMENT_CHANGE_RESUME_1
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Resuming...") #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Resuming...")
#endif #endif
#endif // LCD_HEIGHT < 4 #endif // LCD_HEIGHT < 4

View file

@ -354,208 +354,151 @@ void menu_advanced_pause_option() {
END_MENU(); END_MENU();
} }
void lcd_advanced_pause_init_message() { //
// ADVANCED_PAUSE_FEATURE message screens
//
void _lcd_advanced_pause_message(PGM_P const msg1, PGM_P const msg2=NULL, PGM_P const msg3=NULL) {
START_SCREEN(); START_SCREEN();
STATIC_ITEM_P(advanced_pause_header(), true, true); STATIC_ITEM_P(advanced_pause_header(), true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_1); STATIC_ITEM_P(msg1);
#ifdef MSG_FILAMENT_CHANGE_INIT_2 if (msg2) STATIC_ITEM_P(msg2);
STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_2); if (msg3) STATIC_ITEM_P(msg3);
#define __FC_LINES_A 3 if ((!!msg2) + (!!msg3) + 2 < LCD_HEIGHT - 1) STATIC_ITEM(" ");
#else
#define __FC_LINES_A 2
#endif
#ifdef MSG_FILAMENT_CHANGE_INIT_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_3);
#define _FC_LINES_A (__FC_LINES_A + 1)
#else
#define _FC_LINES_A __FC_LINES_A
#endif
#if LCD_HEIGHT > _FC_LINES_A + 1
STATIC_ITEM(" ");
#endif
HOTEND_STATUS_ITEM(); HOTEND_STATUS_ITEM();
END_SCREEN(); END_SCREEN();
} }
void lcd_advanced_pause_init_message() {
_lcd_advanced_pause_message(MSG_FILAMENT_CHANGE_INIT_1
#ifdef MSG_FILAMENT_CHANGE_INIT_2
, MSG_FILAMENT_CHANGE_INIT_2
#ifdef MSG_FILAMENT_CHANGE_INIT_3
, MSG_FILAMENT_CHANGE_INIT_3
#endif
#endif
);
}
void lcd_advanced_pause_unload_message() { void lcd_advanced_pause_unload_message() {
START_SCREEN(); _lcd_advanced_pause_message(MSG_FILAMENT_CHANGE_UNLOAD_1
STATIC_ITEM_P(advanced_pause_header(), true, true); #ifdef MSG_FILAMENT_CHANGE_UNLOAD_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_1); , MSG_FILAMENT_CHANGE_UNLOAD_2
#ifdef MSG_FILAMENT_CHANGE_UNLOAD_2 #ifdef MSG_FILAMENT_CHANGE_UNLOAD_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_2); , MSG_FILAMENT_CHANGE_UNLOAD_3
#define __FC_LINES_B 3 #endif
#else #endif
#define __FC_LINES_B 2 );
#endif
#ifdef MSG_FILAMENT_CHANGE_UNLOAD_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_3);
#define _FC_LINES_B (__FC_LINES_B + 1)
#else
#define _FC_LINES_B __FC_LINES_B
#endif
#if LCD_HEIGHT > _FC_LINES_B + 1
STATIC_ITEM(" ");
#endif
HOTEND_STATUS_ITEM();
END_SCREEN();
} }
void lcd_advanced_pause_wait_for_nozzles_to_heat() { void lcd_advanced_pause_heating_message() {
START_SCREEN(); _lcd_advanced_pause_message(MSG_FILAMENT_CHANGE_HEATING_1
STATIC_ITEM_P(advanced_pause_header(), true, true); #ifdef MSG_FILAMENT_CHANGE_HEATING_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEATING_1); , MSG_FILAMENT_CHANGE_HEATING_2
#ifdef MSG_FILAMENT_CHANGE_HEATING_2 #ifdef MSG_FILAMENT_CHANGE_HEATING_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEATING_2); , MSG_FILAMENT_CHANGE_HEATING_3
#define _FC_LINES_C 3 #endif
#else #endif
#define _FC_LINES_C 2 );
#endif
#if LCD_HEIGHT > _FC_LINES_C + 1
STATIC_ITEM(" ");
#endif
HOTEND_STATUS_ITEM();
END_SCREEN();
} }
void lcd_advanced_pause_heat_nozzle() { void lcd_advanced_pause_heat_message() {
START_SCREEN(); _lcd_advanced_pause_message(MSG_FILAMENT_CHANGE_HEAT_1
STATIC_ITEM_P(advanced_pause_header(), true, true); #ifdef MSG_FILAMENT_CHANGE_HEAT_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEAT_1); , MSG_FILAMENT_CHANGE_HEAT_2
#ifdef MSG_FILAMENT_CHANGE_INSERT_2 #ifdef MSG_FILAMENT_CHANGE_HEAT_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEAT_2); , MSG_FILAMENT_CHANGE_HEAT_3
#define _FC_LINES_D 3 #endif
#else #endif
#define _FC_LINES_D 2 );
#endif
#if LCD_HEIGHT > _FC_LINES_D + 1
STATIC_ITEM(" ");
#endif
HOTEND_STATUS_ITEM();
END_SCREEN();
} }
void lcd_advanced_pause_insert_message() { void lcd_advanced_pause_insert_message() {
START_SCREEN(); _lcd_advanced_pause_message(MSG_FILAMENT_CHANGE_INSERT_1
STATIC_ITEM_P(advanced_pause_header(), true, true); #ifdef MSG_FILAMENT_CHANGE_INSERT_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_1); , MSG_FILAMENT_CHANGE_INSERT_2
#ifdef MSG_FILAMENT_CHANGE_INSERT_2 #ifdef MSG_FILAMENT_CHANGE_INSERT_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_2); , MSG_FILAMENT_CHANGE_INSERT_3
#define __FC_LINES_E 3 #endif
#else #endif
#define __FC_LINES_E 2 );
#endif
#ifdef MSG_FILAMENT_CHANGE_INSERT_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_3);
#define _FC_LINES_E (__FC_LINES_E + 1)
#else
#define _FC_LINES_E __FC_LINES_E
#endif
#if LCD_HEIGHT > _FC_LINES_E + 1
STATIC_ITEM(" ");
#endif
HOTEND_STATUS_ITEM();
END_SCREEN();
} }
void lcd_advanced_pause_load_message() { void lcd_advanced_pause_load_message() {
START_SCREEN(); _lcd_advanced_pause_message(MSG_FILAMENT_CHANGE_LOAD_1
STATIC_ITEM_P(advanced_pause_header(), true, true); #ifdef MSG_FILAMENT_CHANGE_LOAD_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_1); , MSG_FILAMENT_CHANGE_LOAD_2
#ifdef MSG_FILAMENT_CHANGE_LOAD_2 #ifdef MSG_FILAMENT_CHANGE_LOAD_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_2); , MSG_FILAMENT_CHANGE_LOAD_3
#define __FC_LINES_F 3 #endif
#else #endif
#define __FC_LINES_F 2 );
#endif }
#ifdef MSG_FILAMENT_CHANGE_LOAD_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_3); void lcd_advanced_pause_waiting_message() {
#define _FC_LINES_F (__FC_LINES_F + 1) _lcd_advanced_pause_message(MSG_ADVANCED_PAUSE_WAITING_1
#else #ifdef MSG_ADVANCED_PAUSE_WAITING_2
#define _FC_LINES_F __FC_LINES_F , MSG_ADVANCED_PAUSE_WAITING_2
#endif #ifdef MSG_ADVANCED_PAUSE_WAITING_3
#if LCD_HEIGHT > _FC_LINES_F + 1 , MSG_ADVANCED_PAUSE_WAITING_3
STATIC_ITEM(" "); #endif
#endif #endif
HOTEND_STATUS_ITEM(); );
END_SCREEN(); }
void lcd_advanced_pause_resume_message() {
_lcd_advanced_pause_message(MSG_FILAMENT_CHANGE_RESUME_1
#ifdef MSG_FILAMENT_CHANGE_RESUME_2
, MSG_FILAMENT_CHANGE_RESUME_2
#ifdef MSG_FILAMENT_CHANGE_RESUME_3
, MSG_FILAMENT_CHANGE_RESUME_3
#endif
#endif
);
} }
void lcd_advanced_pause_purge_message() { void lcd_advanced_pause_purge_message() {
START_SCREEN(); START_SCREEN();
STATIC_ITEM_P(advanced_pause_header(), true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_1); STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_1);
#ifdef MSG_FILAMENT_CHANGE_PURGE_2 #ifdef MSG_FILAMENT_CHANGE_PURGE_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_2); STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_2);
#define __FC_LINES_G 3 #ifdef MSG_FILAMENT_CHANGE_PURGE_3
#else STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_3);
#define __FC_LINES_G 2 #endif
#endif #endif
#ifdef MSG_FILAMENT_CHANGE_PURGE_3 #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_3); #define _PURGE_BASE 3
#define _FC_LINES_G (__FC_LINES_G + 1)
#else #else
#define _FC_LINES_G __FC_LINES_G #define _PURGE_BASE 2
#endif #endif
#if LCD_HEIGHT > _FC_LINES_G + 1 #if (_PURGE_BASE + defined(MSG_FILAMENT_CHANGE_PURGE_2) + defined(MSG_FILAMENT_CHANGE_PURGE_3)) < LCD_HEIGHT - 1
STATIC_ITEM(" "); STATIC_ITEM(" ");
#endif #endif
HOTEND_STATUS_ITEM(); HOTEND_STATUS_ITEM();
END_SCREEN(); #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
}
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
void menu_advanced_pause_continuous_purge() {
START_SCREEN();
STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_1);
#ifdef MSG_FILAMENT_CHANGE_PURGE_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_2);
#define __FC_LINES_G 3
#else
#define __FC_LINES_G 2
#endif
#ifdef MSG_FILAMENT_CHANGE_PURGE_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_3);
#define _FC_LINES_G (__FC_LINES_G + 1)
#else
#define _FC_LINES_G __FC_LINES_G
#endif
#if LCD_HEIGHT > _FC_LINES_G + 1
STATIC_ITEM(" ");
#endif
HOTEND_STATUS_ITEM();
STATIC_ITEM(MSG_USERWAIT); STATIC_ITEM(MSG_USERWAIT);
END_SCREEN();
}
#endif
void lcd_advanced_pause_resume_message() {
START_SCREEN();
STATIC_ITEM_P(advanced_pause_header(), true, true);
STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_1);
#ifdef MSG_FILAMENT_CHANGE_RESUME_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_2);
#endif
#ifdef MSG_FILAMENT_CHANGE_RESUME_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_3);
#endif #endif
END_SCREEN(); END_SCREEN();
} }
FORCE_INLINE screenFunc_t ap_message_screen(const AdvancedPauseMessage message) { FORCE_INLINE screenFunc_t ap_message_screen(const AdvancedPauseMessage message) {
switch (message) { switch (message) {
case ADVANCED_PAUSE_MESSAGE_INIT: return lcd_advanced_pause_init_message; case ADVANCED_PAUSE_MESSAGE_INIT: return lcd_advanced_pause_init_message;
case ADVANCED_PAUSE_MESSAGE_UNLOAD: return lcd_advanced_pause_unload_message; case ADVANCED_PAUSE_MESSAGE_UNLOAD: return lcd_advanced_pause_unload_message;
case ADVANCED_PAUSE_MESSAGE_INSERT: return lcd_advanced_pause_insert_message; case ADVANCED_PAUSE_MESSAGE_WAITING: return lcd_advanced_pause_waiting_message;
case ADVANCED_PAUSE_MESSAGE_LOAD: return lcd_advanced_pause_load_message; case ADVANCED_PAUSE_MESSAGE_INSERT: return lcd_advanced_pause_insert_message;
case ADVANCED_PAUSE_MESSAGE_PURGE: return lcd_advanced_pause_purge_message; case ADVANCED_PAUSE_MESSAGE_LOAD: return lcd_advanced_pause_load_message;
case ADVANCED_PAUSE_MESSAGE_RESUME: return lcd_advanced_pause_resume_message;
case ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE: return lcd_advanced_pause_heat_nozzle;
case ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT: return lcd_advanced_pause_wait_for_nozzles_to_heat;
case ADVANCED_PAUSE_MESSAGE_OPTION: advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_WAIT_FOR;
return menu_advanced_pause_option;
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE) #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
case ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE: return menu_advanced_pause_continuous_purge; case ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE:
#else
case ADVANCED_PAUSE_MESSAGE_PURGE:
#endif #endif
return lcd_advanced_pause_purge_message;
case ADVANCED_PAUSE_MESSAGE_RESUME: return lcd_advanced_pause_resume_message;
case ADVANCED_PAUSE_MESSAGE_HEAT: return lcd_advanced_pause_heat_message;
case ADVANCED_PAUSE_MESSAGE_HEATING: return lcd_advanced_pause_heating_message;
case ADVANCED_PAUSE_MESSAGE_OPTION: advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_WAIT_FOR;
return menu_advanced_pause_option;
case ADVANCED_PAUSE_MESSAGE_STATUS: case ADVANCED_PAUSE_MESSAGE_STATUS:
default: break; default: break;
} }