From 43bbf04764e03a355fddd08c6e379167fa3ea41c Mon Sep 17 00:00:00 2001 From: Belin Fieldson Date: Fri, 4 Dec 2020 03:49:30 -0700 Subject: [PATCH] Loosen E on pause for fila-manipulation (#20346) Co-authored-by: Scott Lahteine --- Marlin/src/feature/pause.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 1593b0cc5..c8265a154 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -295,6 +295,18 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l return true; } +/** + * Disabling E steppers for manual filament change should be fine + * as long as users don't spin the E motor ridiculously fast and + * send current back to their board, potentially frying it. + */ +inline void disable_active_extruder() { + #if HAS_E_STEPPER_ENABLE + disable_e_stepper(active_extruder); + safe_delay(100); + #endif +} + /** * Unload filament from the hotend * @@ -357,11 +369,8 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/, planner.settings.retract_acceleration = saved_acceleration; #endif - // Disable E steppers for manual change - #if HAS_E_STEPPER_ENABLE - disable_e_stepper(active_extruder); - safe_delay(100); - #endif + // Disable the Extruder for manual change + disable_active_extruder(); return true; } @@ -447,6 +456,9 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float set_duplication_enabled(saved_ext_dup_mode, saved_ext); #endif + // Disable the Extruder for manual change + disable_active_extruder(); + return true; }