diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-06-22 12:24:20 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-06-22 14:09:01 -0400 |
commit | 20b404ecf5c55a67235b6556b21dcaef46c00200 (patch) | |
tree | 3d5865e5c79be4ee64d0da1a6b48014834a92655 | |
parent | 0791c694995ef2d8f559e2e0c072e34b46aaeaaa (diff) | |
download | kutter-20b404ecf5c55a67235b6556b21dcaef46c00200.tar.gz kutter-20b404ecf5c55a67235b6556b21dcaef46c00200.tar.xz kutter-20b404ecf5c55a67235b6556b21dcaef46c00200.zip |
probe: No need to call kin.get_position() to report position
After a probe operation, homing_move() will already have recalculated
the toolhead position. The get_position() method can be slow, so use
the already calculated position.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | klippy/extras/probe.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py index 939e277e..ca5916ba 100644 --- a/klippy/extras/probe.py +++ b/klippy/extras/probe.py @@ -76,10 +76,9 @@ 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])) + pos = toolhead.get_position() + self.gcode.respond_info("probe at %.3f,%.3f is z=%.6f" % ( + pos[0], pos[1], pos[2])) self.gcode.reset_last_position() cmd_QUERY_PROBE_help = "Return the status of the z-probe" def cmd_QUERY_PROBE(self, params): |