diff options
author | Philippe Daouadi <philippe@ud2.org> | 2023-08-01 19:08:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-01 13:08:53 -0400 |
commit | 039daecb4fde7d37b255eec1308abb5ba41a9ba9 (patch) | |
tree | 1e04d78b7b818ab712d2469fbf101026f77f97a8 /klippy/extras/probe.py | |
parent | 36be1cfc5109355fb50cececedee936905fc6c7d (diff) | |
download | kutter-039daecb4fde7d37b255eec1308abb5ba41a9ba9.tar.gz kutter-039daecb4fde7d37b255eec1308abb5ba41a9ba9.tar.xz kutter-039daecb4fde7d37b255eec1308abb5ba41a9ba9.zip |
axis_twist_compensation: Add X twist compensation module (#6149)
Implements AxisTwistCompensation, and Calibrater
Supports calibration of z-offsets caused by x gantry twist
Modify PrinterProbe._probe function to check if the probed z value should be adjusted
based on axis_twist_compensation's configuration
Add documentation for [axis_twist_compensation] module
Signed-off-by: Jeremy Tan <jeremytkw98@gmail.com>
Diffstat (limited to 'klippy/extras/probe.py')
-rw-r--r-- | klippy/extras/probe.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py index e9f5ef94..337c41b1 100644 --- a/klippy/extras/probe.py +++ b/klippy/extras/probe.py @@ -127,6 +127,15 @@ class PrinterProbe: 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 self.gcode.respond_info("probe at %.3f,%.3f is z=%.6f" % (epos[0], epos[1], epos[2])) return epos[:3] |