diff options
author | Maks Zolin <mzolin@mzbot.us> | 2018-09-13 14:12:59 -0700 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2018-09-14 10:45:28 -0400 |
commit | a9f2a1375a2b41d50afa1914c5630d8bd09bfa4c (patch) | |
tree | b0086ff41f1e44568cd3eb3f473470fac1ec73cd /klippy/extras/quad_gantry_level.py | |
parent | 390d549c0c75a7386fb6ec961d6696521633e423 (diff) | |
download | kutter-a9f2a1375a2b41d50afa1914c5630d8bd09bfa4c.tar.gz kutter-a9f2a1375a2b41d50afa1914c5630d8bd09bfa4c.tar.xz kutter-a9f2a1375a2b41d50afa1914c5630d8bd09bfa4c.zip |
quad_gantry_level: Fix typo, add floating point error protection
Signed-off-by: Maks Zolin <mzolin@vorondesign.com>
Diffstat (limited to 'klippy/extras/quad_gantry_level.py')
-rw-r--r-- | klippy/extras/quad_gantry_level.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/extras/quad_gantry_level.py b/klippy/extras/quad_gantry_level.py index 4c167d15..47a82544 100644 --- a/klippy/extras/quad_gantry_level.py +++ b/klippy/extras/quad_gantry_level.py @@ -47,7 +47,7 @@ class QuadGantryLevel: # Assumes samples come in sequentially grouped_pos = [] for position in positions: - if len(grouped_pos) > 0 and grouped_pos[-1][0] == position[0] and grouped_pos[-1][1] == position[1]: + if len(grouped_pos) > 0 and round(grouped_pos[-1][0],3) == round(position[0],3) and round(grouped_pos[-1][1],3) == round(position[1],3): grouped_pos[-1][2].append(position[2]) else: grouped_pos.append(position) @@ -87,7 +87,7 @@ class QuadGantryLevel: except: logging.exception("quad_gantry_level adjust_steppers") for s in self.z_steppers: - z.set_ignore_move(False) + s.set_ignore_move(False) raise def linefit(self,p1,p2): if p1[1] == p2[1]: |