From 7232bdd8837b50a4f91b2aaab123372578c42a44 Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Thu, 25 Apr 2019 20:41:45 -0400 Subject: [PATCH] Update pause.cpp --- Marlin/src/feature/pause.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 75705e1593..f53a51192a 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -58,6 +58,10 @@ static float resume_position[XYZE]; +#if FAN_COUNT > 0 + static uint8_t stored_fan_speed[FAN_COUNT]; +#endif + PauseMode pause_mode = PAUSE_MODE_PAUSE_PRINT; PauseMenuResponse pause_menu_response; @@ -417,6 +421,13 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u // Wait for buffered blocks to complete planner.synchronize(); + #if FAN_COUNT > 0 + for(int cnt = 0; cnt < FAN_COUNT; cnt++){ + stored_fan_speed[cnt] = thermalManager.fan_speed[cnt]; + thermalManager.fan_speed[cnt] = 0; + } + #endif + // Initial retract before move to filament change position if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE); @@ -653,6 +664,13 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le } #endif + #if FAN_COUNT > 0 + for(int cnt = 0; cnt < FAN_COUNT; cnt++){ + thermalManager.fan_speed[cnt] = stored_fan_speed[cnt]; + stored_fan_speed[cnt] = 0; + } + #endif + // Resume the print job timer if it was running if (print_job_timer.isPaused()) print_job_timer.start();