From 4ec1244c31af2e621eec9a4bbfa59684c8dbf93f Mon Sep 17 00:00:00 2001 From: Hans Raaf Date: Wed, 13 Jun 2018 23:55:58 +0200 Subject: [PATCH] Extras: Probing does reply with the z position where the probe triggers. This change will make the "PROBE" command actually reply with the z-position where the probe triggers. As this command is called internally for the BED_TILT_CALIBRATE and Z_TILT_ADJUST those commands will also give a response while probing, which I see as advantage over the silent operation. This change also lets one define some gcode for a repeatable probing test to meassure the quality of the sensor and overall probing accuracy. Signed-off-by: Hans Raaf --- klippy/extras/probe.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py index 99e4e80e..9aab1d9d 100644 --- a/klippy/extras/probe.py +++ b/klippy/extras/probe.py @@ -76,6 +76,10 @@ class PrinterProbe: if "Timeout during endstop homing" in reason: reason += HINT_TIMEOUT raise self.gcode.error(reason) + kin = toolhead.get_kinematics() + pos = kin.get_position() + self.gcode.respond_info( + "probe z: %.3f" % (pos[2])) self.gcode.reset_last_position() cmd_QUERY_PROBE_help = "Return the status of the z-probe" def cmd_QUERY_PROBE(self, params):