Update pause.cpp

This commit is contained in:
InsanityAutomation
2019-04-25 20:41:45 -04:00
parent e4cad11951
commit 7232bdd883
+18
View File
@@ -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();