aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/example-extras.cfg9
-rw-r--r--klippy/extras/z_tilt.py3
2 files changed, 12 insertions, 0 deletions
diff --git a/config/example-extras.cfg b/config/example-extras.cfg
index 63e3e70b..7322e9bb 100644
--- a/config/example-extras.cfg
+++ b/config/example-extras.cfg
@@ -310,6 +310,15 @@
#horizontal_move_z: 5
# The height (in mm) that the head should be commanded to move to
# just prior to starting a probe operation. The default is 5.
+#retries: 0
+# Number of times to retry if the probed points aren't within tolerance
+#retry_tolerance: 0
+# if retries are enabled then retry if largest and smallest probed points
+# differ more than retry_tolerance.
+# Note the smallest unit of change here would be a single step. However if you
+# are probing more points than steppers then you will likely have a fixed
+# minimum value for the range of probed points which you can learn by observing
+# command output.
# Moving gantry leveling using 4 independently controlled Z motors.
diff --git a/klippy/extras/z_tilt.py b/klippy/extras/z_tilt.py
index 69ac946f..3c3656f3 100644
--- a/klippy/extras/z_tilt.py
+++ b/klippy/extras/z_tilt.py
@@ -117,6 +117,7 @@ class ZTilt:
except:
raise config.error("Unable to parse z_positions in %s" % (
config.get_name()))
+ self.retry_helper = RetryHelper(config)
self.probe_helper = probe.ProbePointsHelper(config, self.probe_finalize)
self.probe_helper.minimum_points(2)
self.z_helper = ZAdjustHelper(config, len(self.z_positions))
@@ -126,6 +127,7 @@ class ZTilt:
desc=self.cmd_Z_TILT_ADJUST_help)
cmd_Z_TILT_ADJUST_help = "Adjust the Z tilt"
def cmd_Z_TILT_ADJUST(self, params):
+ self.retry_helper.start(params)
self.probe_helper.start_probe(params)
def probe_finalize(self, offsets, positions):
# Setup for coordinate descent analysis
@@ -154,6 +156,7 @@ class ZTilt:
adjustments = [x*x_adjust + y*y_adjust + z_adjust
for x, y in self.z_positions]
self.z_helper.adjust_steppers(adjustments, speed)
+ return self.retry_helper.check_retry([p[2] for p in positions])
def load_config(config):
return ZTilt(config)