z_tilt: bugfix for final correction of z-offset

The z_adjust offset provided to adjust_steppers is calculated given the
steppers adjust exactly according to the given x_adjust/y_adjust. As the
algorithm eliminates an offset that is common to all steppers, this offset
must be taken into account in the final correction.

Signed-off-by: Arne Jansen <arne@die-jansens.de>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Arne Jansen 2019-03-10 13:42:38 +00:00 committed by Kevin O'Connor
parent 34d32c7823
commit f145439267
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ class ZTilt:
# Z should now be level - do final cleanup
last_stepper_offset, last_stepper = positions[-1]
last_stepper.set_ignore_move(False)
curpos[2] -= z_adjust
curpos[2] -= z_adjust - first_stepper_offset
toolhead.set_position(curpos)
self.gcode.reset_last_position()