Minor cleanup of pause code (#13030)

This commit is contained in:
Giuliano Zaro 2019-01-28 06:10:25 +01:00 committed by Scott Lahteine
parent 0da636e1a3
commit a79d80c78e
3 changed files with 5 additions and 9 deletions

View File

@ -329,12 +329,6 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
host_action_pause(); host_action_pause();
#endif #endif
#if HAS_LCD_MENU
if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT);
#else
UNUSED(show_lcd);
#endif
if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) { if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) {
SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD); SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD);
@ -343,6 +337,8 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS); lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
LCD_MESSAGEPGM(MSG_M600_TOO_COLD); LCD_MESSAGEPGM(MSG_M600_TOO_COLD);
} }
#else
UNUSED(show_lcd);
#endif #endif
return false; // unable to reach safe temperature return false; // unable to reach safe temperature

View File

@ -79,8 +79,8 @@ void GcodeSuite::M125() {
#endif #endif
#if HAS_LCD_MENU #if HAS_LCD_MENU
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT);
const bool show_lcd = parser.seenval('P'); const bool show_lcd = parser.seenval('P');
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, active_extruder);
#else #else
constexpr bool show_lcd = false; constexpr bool show_lcd = false;
#endif #endif

View File

@ -48,8 +48,8 @@ void lcd_pause() {
#endif #endif
#if ENABLED(PARK_HEAD_ON_PAUSE) #if ENABLED(PARK_HEAD_ON_PAUSE)
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, active_extruder); lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT); // Show message immediately to let user know about pause in progress
enqueue_and_echo_commands_P(PSTR("M25 P; \n M24")); enqueue_and_echo_commands_P(PSTR("M25 P\nM24"));
#elif ENABLED(SDSUPPORT) #elif ENABLED(SDSUPPORT)
enqueue_and_echo_commands_P(PSTR("M25")); enqueue_and_echo_commands_P(PSTR("M25"));
#elif defined(ACTION_ON_PAUSE) #elif defined(ACTION_ON_PAUSE)