From c9daefd97f61c8e291dcee6496fcfb5bf3926576 Mon Sep 17 00:00:00 2001
From: fess <fess@fess.org>
Date: Mon, 18 May 2020 04:38:22 +0000
Subject: [PATCH] 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>
---
 klippy/extras/z_tilt.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/klippy/extras/z_tilt.py b/klippy/extras/z_tilt.py
index 8be25e3de..43c123de7 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,