From af2ea23e9ca2e317818c82bca07403d54050c192 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 20 Mar 2017 16:41:59 -0500 Subject: [PATCH] EXTRUDER_RUNOUT_PREVENT uses buffer_line_kinematic --- Marlin/Marlin_main.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ab310817b5..2b8f2db83e 100755 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -10500,23 +10500,12 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { previous_cmd_ms = ms; // refresh_cmd_timeout() - #if IS_KINEMATIC - inverse_kinematics(current_position); - ADJUST_DELTA(current_position); - planner.buffer_line( - delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], - current_position[E_AXIS] + EXTRUDER_RUNOUT_EXTRUDE, - MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder - ); - #else - planner.buffer_line( - current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], - current_position[E_AXIS] + EXTRUDER_RUNOUT_EXTRUDE, - MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder - ); - #endif + const float olde = current_position[E_AXIS]; + current_position[E_AXIS] += EXTRUDER_RUNOUT_EXTRUDE; + planner.buffer_line_kinematic(current_position, MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder); + current_position[E_AXIS] = olde; + planner.set_e_position_mm(olde); stepper.synchronize(); - planner.set_e_position_mm(current_position[E_AXIS]); #if ENABLED(SWITCHING_EXTRUDER) E0_ENABLE_WRITE(oldstatus); #else