probe: Return to start XY position on each attempt in PROBE_ACCURACY
Some checks failed
Build test / build (push) Has been cancelled

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2026-01-05 12:27:03 -05:00
parent be5e548833
commit 082da1d85b

View file

@ -126,11 +126,11 @@ class ProbeCommandHelper:
params = self.probe.get_probe_params(gcmd)
sample_count = gcmd.get_int("SAMPLES", 10, minval=1)
toolhead = self.printer.lookup_object('toolhead')
pos = toolhead.get_position()
start_pos = toolhead.get_position()
gcmd.respond_info("PROBE_ACCURACY at X:%.3f Y:%.3f Z:%.3f"
" (samples=%d retract=%.3f"
" speed=%.1f lift_speed=%.1f)\n"
% (pos[0], pos[1], pos[2],
% (start_pos[0], start_pos[1], start_pos[2],
sample_count, params['sample_retract_dist'],
params['probe_speed'], params['lift_speed']))
# Create dummy gcmd with SAMPLES=1
@ -146,8 +146,8 @@ class ProbeCommandHelper:
probe_session.run_probe(fo_gcmd)
probe_num += 1
# Retract
pos = toolhead.get_position()
liftpos = [None, None, pos[2] + params['sample_retract_dist']]
lift_z = toolhead.get_position()[2] + params['sample_retract_dist']
liftpos = [start_pos[0], start_pos[1], lift_z]
self._move(liftpos, params['lift_speed'])
positions = probe_session.pull_probed_results()
probe_session.end_probe_session()