From 8a5eaa3c9b53548337306f34077d27aed0a69391 Mon Sep 17 00:00:00 2001 From: whosawhatsis Date: Sun, 19 Jan 2014 19:11:51 -0800 Subject: [PATCH] Fix crash after home bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes a bug in the Extruder Runout Prevention feature that caused the extruder to move back to “current_position” after a move if it was activated while the move was in progress. For long home moves (which are longer than the dimensions of the machine’s working area), this would cause the machine to crash into the far end of its travel after homing. This usually occurred on the Z axis, which could result in damage to the machine if you don’t hit the reset button in time. --- Marlin/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 26bc66f7de..920aed00c4 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3298,8 +3298,8 @@ void manage_inactivity() enable_e0(); float oldepos=current_position[E_AXIS]; float oldedes=destination[E_AXIS]; - plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], - current_position[E_AXIS]+EXTRUDER_RUNOUT_EXTRUDE*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS], + plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], + destination[E_AXIS]+EXTRUDER_RUNOUT_EXTRUDE*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS], EXTRUDER_RUNOUT_SPEED/60.*EXTRUDER_RUNOUT_ESTEPS/axis_steps_per_unit[E_AXIS], active_extruder); current_position[E_AXIS]=oldepos; destination[E_AXIS]=oldedes;