diff options
author | fess <fess@fess.org> | 2020-05-18 04:38:22 +0000 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2020-05-18 14:55:25 -0400 |
commit | c9daefd97f61c8e291dcee6496fcfb5bf3926576 (patch) | |
tree | 382a2af2c556f98cf93df5e42dd61ce443bc7e36 | |
parent | 7b0e6725caea83036394b112794799a24c66d7cc (diff) | |
download | kutter-c9daefd97f61c8e291dcee6496fcfb5bf3926576.tar.gz kutter-c9daefd97f61c8e291dcee6496fcfb5bf3926576.tar.xz kutter-c9daefd97f61c8e291dcee6496fcfb5bf3926576.zip |
z_tilt: retries, fix extra retry bug.
round to only 6 decimal places of precision. prevents doing extra retry
from small variations due to floating point math.
Signed-off-by: John "Fess" Fessenden <fess@fess.org>
-rw-r--r-- | klippy/extras/z_tilt.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/extras/z_tilt.py b/klippy/extras/z_tilt.py index 8be25e3d..43c123de 100644 --- a/klippy/extras/z_tilt.py +++ b/klippy/extras/z_tilt.py @@ -93,7 +93,7 @@ class RetryHelper: def check_retry(self, z_positions): if self.max_retries == 0: return - error = max(z_positions) - min(z_positions) + error = round(max(z_positions) - min(z_positions),6) self.gcode.respond_info( "Retries: %d/%d %s: %0.6f tolerance: %0.6f" % ( self.current_retry, self.max_retries, self.value_label, |