From f1454392678a3e3fe364d74fd83d1b2698acfe26 Mon Sep 17 00:00:00 2001 From: Arne Jansen Date: Sun, 10 Mar 2019 13:42:38 +0000 Subject: [PATCH] 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 Signed-off-by: Kevin O'Connor --- klippy/extras/z_tilt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klippy/extras/z_tilt.py b/klippy/extras/z_tilt.py index bcbfddd9..d679d398 100644 --- a/klippy/extras/z_tilt.py +++ b/klippy/extras/z_tilt.py @@ -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()