aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/probe.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-05-24 21:04:49 -0400
committerKevin O'Connor <kevin@koconnor.net>2024-06-10 12:20:21 -0400
commite780049a74310d23d110d8beac37b980459893a4 (patch)
tree856d9312e8d479e79970f13c66ad3e90953a8400 /klippy/extras/probe.py
parentf4adb2999920e203445e0d6e12b0b08650ae5e19 (diff)
downloadkutter-e780049a74310d23d110d8beac37b980459893a4.tar.gz
kutter-e780049a74310d23d110d8beac37b980459893a4.tar.xz
kutter-e780049a74310d23d110d8beac37b980459893a4.zip
probe: Use an event for axis twist compensation updates
Instead of directly calling axis_twist_compensation, send an event that can perform the necessary updates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/probe.py')
-rw-r--r--klippy/extras/probe.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py
index ca778cc9..b643dff9 100644
--- a/klippy/extras/probe.py
+++ b/klippy/extras/probe.py
@@ -309,15 +309,9 @@ class ProbeSessionHelper:
if "Timeout during endstop homing" in reason:
reason += HINT_TIMEOUT
raise self.printer.command_error(reason)
- # get z compensation from axis_twist_compensation
- axis_twist_compensation = self.printer.lookup_object(
- 'axis_twist_compensation', None)
- z_compensation = 0
- if axis_twist_compensation is not None:
- z_compensation = (
- axis_twist_compensation.get_z_compensation_value(pos))
- # add z compensation to probe position
- epos[2] += z_compensation
+ # Allow axis_twist_compensation to update results
+ self.printer.send_event("probe:update_results", epos)
+ # Report results
gcode = self.printer.lookup_object('gcode')
gcode.respond_info("probe at %.3f,%.3f is z=%.6f"
% (epos[0], epos[1], epos[2]))