From a79d80c78ec53f50915ead10e657a7e047bec4ca Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon, 28 Jan 2019 06:10:25 +0100 Subject: [PATCH] Minor cleanup of pause code (#13030) --- Marlin/src/feature/pause.cpp | 8 ++------ Marlin/src/gcode/feature/pause/M125.cpp | 2 +- Marlin/src/lcd/menu/menu_main.cpp | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 043c211ee3..867e3b52ac 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -329,12 +329,6 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u host_action_pause(); #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)) { 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_MESSAGEPGM(MSG_M600_TOO_COLD); } + #else + UNUSED(show_lcd); #endif return false; // unable to reach safe temperature diff --git a/Marlin/src/gcode/feature/pause/M125.cpp b/Marlin/src/gcode/feature/pause/M125.cpp index 4f02592a21..23d9a99177 100644 --- a/Marlin/src/gcode/feature/pause/M125.cpp +++ b/Marlin/src/gcode/feature/pause/M125.cpp @@ -79,8 +79,8 @@ void GcodeSuite::M125() { #endif #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'); - lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, active_extruder); #else constexpr bool show_lcd = false; #endif diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 6af8da662f..0944a7f5f2 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -48,8 +48,8 @@ void lcd_pause() { #endif #if ENABLED(PARK_HEAD_ON_PAUSE) - lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, active_extruder); - enqueue_and_echo_commands_P(PSTR("M25 P; \n M24")); + 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\nM24")); #elif ENABLED(SDSUPPORT) enqueue_and_echo_commands_P(PSTR("M25")); #elif defined(ACTION_ON_PAUSE)