From 0a4a64058d8190d219d789b95ab58d6b7bea1415 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 5 Apr 2021 10:18:02 -0400 Subject: [PATCH] probe: Use original XY position on multiple probe samples On some kinematics it's possible for the XY position to change slightly during a probing move. Return back to the original XY position on a probe lift so each probe attempt starts at the same nominal position. Signed-off-by: Kevin O'Connor --- klippy/extras/probe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py index 47f438db..a8fc36a6 100644 --- a/klippy/extras/probe.py +++ b/klippy/extras/probe.py @@ -154,6 +154,7 @@ class PrinterProbe: must_notify_multi_probe = not self.multi_probe_pending if must_notify_multi_probe: self.multi_probe_begin() + probexy = self.printer.lookup_object('toolhead').get_position()[:2] retries = 0 positions = [] while len(positions) < sample_count: @@ -170,8 +171,7 @@ class PrinterProbe: positions = [] # Retract if len(positions) < sample_count: - liftpos = [None, None, pos[2] + sample_retract_dist] - self._move(liftpos, lift_speed) + self._move(probexy + [pos[2] + sample_retract_dist], lift_speed) if must_notify_multi_probe: self.multi_probe_end() # Calculate and return result