Skip to content

Commit

Permalink
probe_eddy_current: Allows calibration of eddy probe without home z-axis
Browse files Browse the repository at this point in the history
Signed-off-by: Alan.Ma from BigTreeTech [email protected]
  • Loading branch information
bigtreetech committed Apr 17, 2024
1 parent 9e0e625 commit 9574754
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions klippy/extras/probe_eddy_current.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ def post_manual_probe(self, kin_pos):
cmd_EDDY_CALIBRATE_help = "Calibrate eddy current probe"
def cmd_EDDY_CALIBRATE(self, gcmd):
self.probe_speed = gcmd.get_float("PROBE_SPEED", 5., above=0.)
toolhead = self.printer.lookup_object('toolhead')
curtime = self.printer.get_reactor().monotonic()
if 'xy' not in toolhead.get_status(curtime)['homed_axes']:
raise self.printer.command_error("Must home X and Y before probe")
if 'z' not in toolhead.get_status(curtime)['homed_axes']:
pos = toolhead.get_position()
pos[2] = toolhead.get_status(curtime)["axis_maximum"][2]
toolhead.set_position(pos, homing_axes=[2])
# Start manual probe
manual_probe.ManualProbeHelper(self.printer, gcmd,
self.post_manual_probe)
Expand Down

0 comments on commit 9574754

Please sign in to comment.