From 2f2459c0db59bb9cf009101c57a0c65550f41b7d Mon Sep 17 00:00:00 2001 From: whosawhatsis Date: Sun, 16 Feb 2014 15:53:01 -0800 Subject: [PATCH] Fix G10/G11 Z-lift --- Marlin/Marlin_main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 9032713750..1681c88b70 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1134,7 +1134,6 @@ void process_commands() destination[X_AXIS]=current_position[X_AXIS]; destination[Y_AXIS]=current_position[Y_AXIS]; destination[Z_AXIS]=current_position[Z_AXIS]; - current_position[Z_AXIS]-=retract_zlift; destination[E_AXIS]=current_position[E_AXIS]; current_position[E_AXIS]+=retract_length/volumetric_multiplier[active_extruder]; plan_set_e_position(current_position[E_AXIS]); @@ -1142,6 +1141,9 @@ void process_commands() feedrate=retract_feedrate; retracted=true; prepare_move(); + current_position[Z_AXIS]-=retract_zlift; + plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); + prepare_move(); feedrate = oldFeedrate; } @@ -1152,8 +1154,10 @@ void process_commands() destination[X_AXIS]=current_position[X_AXIS]; destination[Y_AXIS]=current_position[Y_AXIS]; destination[Z_AXIS]=current_position[Z_AXIS]; - current_position[Z_AXIS]+=retract_zlift; destination[E_AXIS]=current_position[E_AXIS]; + current_position[Z_AXIS]+=retract_zlift; + plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); + //prepare_move(); current_position[E_AXIS]-=(retract_length+retract_recover_length)/volumetric_multiplier[active_extruder]; plan_set_e_position(current_position[E_AXIS]); float oldFeedrate = feedrate;