From 52665f54adb01018f495cfc452e6f742281bffd0 Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Tue, 19 Feb 2019 15:37:18 -0500 Subject: [PATCH] Fix bad Purge More logic (#13193) --- Marlin/src/feature/pause.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 7dc63786d..1a61fe90e 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -137,6 +137,10 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/ DXC_ARGS ) { + #if !HAS_LCD_MENU + UNUSED(show_lcd); + #endif + if (!ensure_safe_temperature(mode)) { #if HAS_LCD_MENU if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS, mode); @@ -183,8 +187,6 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l #if HAS_LCD_MENU if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode); - #else - UNUSED(show_lcd); #endif #if ENABLED(DUAL_X_CARRIAGE) @@ -276,7 +278,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l // Keep looping if "Purge More" was selected } while (false #if HAS_LCD_MENU - && show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE + || (show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE) #endif ); @@ -298,6 +300,10 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/, const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/ ) { + #if !HAS_LCD_MENU + UNUSED(show_lcd); + #endif + if (!ensure_safe_temperature(mode)) { #if HAS_LCD_MENU if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS); @@ -308,8 +314,6 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/, #if HAS_LCD_MENU if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_UNLOAD, mode); - #else - UNUSED(show_lcd); #endif // Retract filament @@ -361,6 +365,10 @@ uint8_t did_pause_print = 0; bool pause_print(const float &retract, const point_t &park_point, const float &unload_length/*=0*/, const bool show_lcd/*=false*/ DXC_ARGS) { + #if !HAS_LCD_MENU + UNUSED(show_lcd); + #endif + if (did_pause_print) return false; // already paused #if ENABLED(HOST_ACTION_COMMANDS) @@ -382,8 +390,6 @@ 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