Skip to content

Commit

Permalink
Merge pull request #3089 from thinkyhead/rc_apply_2924
Browse files Browse the repository at this point in the history
Correct raise_z_for_servo for Z offsets below the nozzle
  • Loading branch information
thinkyhead committed Mar 6, 2016
2 parents 04a0d45 + 0fb507a commit aa0b048
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,9 @@ static void setup_for_endstop_move() {

void raise_z_for_servo() {
float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_PROBING;
z_dest += axis_known_position[Z_AXIS] ? zprobe_zoffset : zpos;
// The zprobe_zoffset is negative any switch below the nozzle, so
// multiply by Z_HOME_DIR (-1) to move enough away from bed for the probe
z_dest += axis_known_position[Z_AXIS] ? zprobe_zoffset * Z_HOME_DIR : zpos;
if (zpos < z_dest) do_blocking_move_to_z(z_dest); // also updates current_position
}

Expand Down

0 comments on commit aa0b048

Please sign in to comment.