Possible fix for FWRETRACT with 0 zlift.

master
Erik van der Zalm 10 years ago
parent 8f9067faa6
commit 8a2e84e3f1

@ -1283,6 +1283,7 @@ void refresh_cmd_timeout(void)
feedrate=retract_feedrate*60; feedrate=retract_feedrate*60;
retracted[active_extruder]=true; retracted[active_extruder]=true;
prepare_move(); prepare_move();
if(retract_zlift > 0.01) {
current_position[Z_AXIS]-=retract_zlift; current_position[Z_AXIS]-=retract_zlift;
#ifdef DELTA #ifdef DELTA
calculate_delta(current_position); // change cartesian kinematic to delta kinematic; calculate_delta(current_position); // change cartesian kinematic to delta kinematic;
@ -1291,12 +1292,14 @@ void refresh_cmd_timeout(void)
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
#endif #endif
prepare_move(); prepare_move();
}
feedrate = oldFeedrate; feedrate = oldFeedrate;
} else if(!retracting && retracted[active_extruder]) { } else if(!retracting && retracted[active_extruder]) {
destination[X_AXIS]=current_position[X_AXIS]; destination[X_AXIS]=current_position[X_AXIS];
destination[Y_AXIS]=current_position[Y_AXIS]; destination[Y_AXIS]=current_position[Y_AXIS];
destination[Z_AXIS]=current_position[Z_AXIS]; destination[Z_AXIS]=current_position[Z_AXIS];
destination[E_AXIS]=current_position[E_AXIS]; destination[E_AXIS]=current_position[E_AXIS];
if(retract_zlift > 0.01) {
current_position[Z_AXIS]+=retract_zlift; current_position[Z_AXIS]+=retract_zlift;
#ifdef DELTA #ifdef DELTA
calculate_delta(current_position); // change cartesian kinematic to delta kinematic; calculate_delta(current_position); // change cartesian kinematic to delta kinematic;
@ -1305,6 +1308,7 @@ void refresh_cmd_timeout(void)
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
#endif #endif
//prepare_move(); //prepare_move();
}
if (swapretract) { if (swapretract) {
current_position[E_AXIS]-=(retract_length_swap+retract_recover_length_swap)/volumetric_multiplier[active_extruder]; current_position[E_AXIS]-=(retract_length_swap+retract_recover_length_swap)/volumetric_multiplier[active_extruder];
} else { } else {

Loading…
Cancel
Save