Browse Source

Show the appropriate pause message (#12348)

pull/1/head
Scott Lahteine 6 years ago
committed by GitHub
parent
commit
4c5ca89d8c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      Marlin/src/core/language.h
  2. 56
      Marlin/src/feature/pause.cpp
  3. 10
      Marlin/src/feature/pause.h
  4. 2
      Marlin/src/gcode/feature/pause/M125.cpp
  5. 2
      Marlin/src/gcode/feature/pause/M600.cpp
  6. 31
      Marlin/src/lcd/language/language_en.h
  7. 211
      Marlin/src/lcd/menu/menu_filament.cpp

3
Marlin/src/core/language.h

@ -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!"

56
Marlin/src/feature/pause.cpp

@ -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

10
Marlin/src/feature/pause.h

@ -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);

2
Marlin/src/gcode/feature/pause/M125.cpp

@ -71,7 +71,7 @@ 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
} }

2
Marlin/src/gcode/feature/pause/M600.cpp

@ -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);
} }

31
Marlin/src/lcd/language/language_en.h

@ -1097,28 +1097,32 @@
// ...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 #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
#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")
@ -1129,9 +1133,12 @@
#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

211
Marlin/src/lcd/menu/menu_filament.cpp

@ -354,189 +354,129 @@ 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);
if (msg2) STATIC_ITEM_P(msg2);
if (msg3) STATIC_ITEM_P(msg3);
if ((!!msg2) + (!!msg3) + 2 < LCD_HEIGHT - 1) STATIC_ITEM(" ");
HOTEND_STATUS_ITEM();
END_SCREEN();
}
void lcd_advanced_pause_init_message() {
_lcd_advanced_pause_message(MSG_FILAMENT_CHANGE_INIT_1
#ifdef MSG_FILAMENT_CHANGE_INIT_2 #ifdef MSG_FILAMENT_CHANGE_INIT_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_2); , MSG_FILAMENT_CHANGE_INIT_2
#define __FC_LINES_A 3
#else
#define __FC_LINES_A 2
#endif
#ifdef MSG_FILAMENT_CHANGE_INIT_3 #ifdef MSG_FILAMENT_CHANGE_INIT_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_3); , MSG_FILAMENT_CHANGE_INIT_3
#define _FC_LINES_A (__FC_LINES_A + 1)
#else
#define _FC_LINES_A __FC_LINES_A
#endif #endif
#if LCD_HEIGHT > _FC_LINES_A + 1
STATIC_ITEM(" ");
#endif #endif
HOTEND_STATUS_ITEM(); );
END_SCREEN();
} }
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);
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_1);
#ifdef MSG_FILAMENT_CHANGE_UNLOAD_2 #ifdef MSG_FILAMENT_CHANGE_UNLOAD_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_2); , MSG_FILAMENT_CHANGE_UNLOAD_2
#define __FC_LINES_B 3
#else
#define __FC_LINES_B 2
#endif
#ifdef MSG_FILAMENT_CHANGE_UNLOAD_3 #ifdef MSG_FILAMENT_CHANGE_UNLOAD_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_3); , MSG_FILAMENT_CHANGE_UNLOAD_3
#define _FC_LINES_B (__FC_LINES_B + 1)
#else
#define _FC_LINES_B __FC_LINES_B
#endif #endif
#if LCD_HEIGHT > _FC_LINES_B + 1
STATIC_ITEM(" ");
#endif #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);
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEATING_1);
#ifdef MSG_FILAMENT_CHANGE_HEATING_2 #ifdef MSG_FILAMENT_CHANGE_HEATING_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEATING_2); , MSG_FILAMENT_CHANGE_HEATING_2
#define _FC_LINES_C 3 #ifdef MSG_FILAMENT_CHANGE_HEATING_3
#else , MSG_FILAMENT_CHANGE_HEATING_3
#define _FC_LINES_C 2
#endif #endif
#if LCD_HEIGHT > _FC_LINES_C + 1
STATIC_ITEM(" ");
#endif #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
#else
#define _FC_LINES_D 2
#endif #endif
#if LCD_HEIGHT > _FC_LINES_D + 1
STATIC_ITEM(" ");
#endif #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);
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_1);
#ifdef MSG_FILAMENT_CHANGE_INSERT_2 #ifdef MSG_FILAMENT_CHANGE_INSERT_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_2); , MSG_FILAMENT_CHANGE_INSERT_2
#define __FC_LINES_E 3
#else
#define __FC_LINES_E 2
#endif
#ifdef MSG_FILAMENT_CHANGE_INSERT_3 #ifdef MSG_FILAMENT_CHANGE_INSERT_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_3); , MSG_FILAMENT_CHANGE_INSERT_3
#define _FC_LINES_E (__FC_LINES_E + 1)
#else
#define _FC_LINES_E __FC_LINES_E
#endif #endif
#if LCD_HEIGHT > _FC_LINES_E + 1
STATIC_ITEM(" ");
#endif #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);
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_1);
#ifdef MSG_FILAMENT_CHANGE_LOAD_2 #ifdef MSG_FILAMENT_CHANGE_LOAD_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_2); , MSG_FILAMENT_CHANGE_LOAD_2
#define __FC_LINES_F 3
#else
#define __FC_LINES_F 2
#endif
#ifdef MSG_FILAMENT_CHANGE_LOAD_3 #ifdef MSG_FILAMENT_CHANGE_LOAD_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_3); , MSG_FILAMENT_CHANGE_LOAD_3
#define _FC_LINES_F (__FC_LINES_F + 1)
#else
#define _FC_LINES_F __FC_LINES_F
#endif #endif
#if LCD_HEIGHT > _FC_LINES_F + 1
STATIC_ITEM(" ");
#endif #endif
HOTEND_STATUS_ITEM(); );
END_SCREEN();
} }
void lcd_advanced_pause_purge_message() { void lcd_advanced_pause_waiting_message() {
START_SCREEN(); _lcd_advanced_pause_message(MSG_ADVANCED_PAUSE_WAITING_1
STATIC_ITEM_P(advanced_pause_header(), true, true); #ifdef MSG_ADVANCED_PAUSE_WAITING_2
STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_1); , MSG_ADVANCED_PAUSE_WAITING_2
#ifdef MSG_FILAMENT_CHANGE_PURGE_2 #ifdef MSG_ADVANCED_PAUSE_WAITING_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_2); , MSG_ADVANCED_PAUSE_WAITING_3
#define __FC_LINES_G 3
#else
#define __FC_LINES_G 2
#endif #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 #endif
#if LCD_HEIGHT > _FC_LINES_G + 1 );
STATIC_ITEM(" "); }
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
HOTEND_STATUS_ITEM(); #endif
END_SCREEN(); );
} }
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE) void lcd_advanced_pause_purge_message() {
void menu_advanced_pause_continuous_purge() {
START_SCREEN(); START_SCREEN();
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
#else
#define __FC_LINES_G 2
#endif
#ifdef MSG_FILAMENT_CHANGE_PURGE_3 #ifdef MSG_FILAMENT_CHANGE_PURGE_3
STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_3); STATIC_ITEM(MSG_FILAMENT_CHANGE_PURGE_3);
#define _FC_LINES_G (__FC_LINES_G + 1) #endif
#endif
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
#define _PURGE_BASE 3
#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();
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
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();
} }
@ -545,17 +485,20 @@ 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_WAITING: return lcd_advanced_pause_waiting_message;
case ADVANCED_PAUSE_MESSAGE_INSERT: return lcd_advanced_pause_insert_message; case ADVANCED_PAUSE_MESSAGE_INSERT: return lcd_advanced_pause_insert_message;
case ADVANCED_PAUSE_MESSAGE_LOAD: return lcd_advanced_pause_load_message; case ADVANCED_PAUSE_MESSAGE_LOAD: return lcd_advanced_pause_load_message;
case ADVANCED_PAUSE_MESSAGE_PURGE: return lcd_advanced_pause_purge_message; #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
case ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE:
#else
case ADVANCED_PAUSE_MESSAGE_PURGE:
#endif
return lcd_advanced_pause_purge_message;
case ADVANCED_PAUSE_MESSAGE_RESUME: return lcd_advanced_pause_resume_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_HEAT: return lcd_advanced_pause_heat_message;
case ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT: return lcd_advanced_pause_wait_for_nozzles_to_heat; 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; case ADVANCED_PAUSE_MESSAGE_OPTION: advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_WAIT_FOR;
return menu_advanced_pause_option; return menu_advanced_pause_option;
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
case ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE: return menu_advanced_pause_continuous_purge;
#endif
case ADVANCED_PAUSE_MESSAGE_STATUS: case ADVANCED_PAUSE_MESSAGE_STATUS:
default: break; default: break;
} }

Loading…
Cancel
Save