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 <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-04-05 10:18:02 -04:00
parent 0990a3da6f
commit 0a4a64058d
1 changed files with 2 additions and 2 deletions

View File

@ -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