From e4e290d957e4b34acec6906bb7a60763102a4472 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 9 Oct 2016 15:21:36 -0500 Subject: [PATCH] Make EXTRUDER_RUNOUT_PREVENT kinematic compatible --- Marlin/Marlin_main.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7705b6b7b2..a106b3df91 100755 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -9463,11 +9463,22 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { #endif // !SWITCHING_EXTRUDER previous_cmd_ms = ms; // refresh_cmd_timeout() - 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 - ); + + #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 stepper.synchronize(); planner.set_e_position_mm(current_position[E_AXIS]); #if ENABLED(SWITCHING_EXTRUDER)