Skip to content

Commit

Permalink
probe重试大于1次后,增加retract距离,降低lift速度为1mm/s.
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoGeTiertime committed Nov 20, 2024
1 parent 14b6848 commit de29c6a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions klippy/extras/probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,12 @@ def run_probe(self, gcmd):
positions = positions[-1:] # only keep the last sample
# Retract
if len(positions) < sample_count:
toolhead.manual_move(
probexy + [pos[2] + probe_retract],
params['lift_speed'])
liftdis = probe_retract
liftspeed = params['lift_speed']
if retries > 1: # if exceed 1 retries, double the lift distance and reduce speed to 1
liftdis *= 2
liftspeed = 1
toolhead.manual_move(probexy + [pos[2] + liftdis], liftspeed)
# Calculate result
epos = calc_probe_z_average(positions, params['samples_result'])
self.results.append(epos)
Expand Down

0 comments on commit de29c6a

Please sign in to comment.