diff options
author | Arksine <arksine.code@gmail.com> | 2020-07-05 14:19:43 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2020-07-25 12:05:29 -0400 |
commit | 7c8b60b40ed0a88214665cca8bb8e4961125d0de (patch) | |
tree | 9368b8ef6fa148025cb7a9b11661efc534607818 /klippy/extras/bed_mesh.py | |
parent | 6458def58899e1b9e9b68d44ddf05da8d67e1b4e (diff) | |
download | kutter-7c8b60b40ed0a88214665cca8bb8e4961125d0de.tar.gz kutter-7c8b60b40ed0a88214665cca8bb8e4961125d0de.tar.xz kutter-7c8b60b40ed0a88214665cca8bb8e4961125d0de.zip |
bed_mesh: round x and y positions received via the finalize callback
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Update bed_mesh.py
Diffstat (limited to 'klippy/extras/bed_mesh.py')
-rw-r--r-- | klippy/extras/bed_mesh.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/extras/bed_mesh.py b/klippy/extras/bed_mesh.py index ac7c8012..89b84aaa 100644 --- a/klippy/extras/bed_mesh.py +++ b/klippy/extras/bed_mesh.py @@ -504,6 +504,8 @@ class BedMeshCalibrate: print_func("bed_mesh: bed has not been probed") def probe_finalize(self, offsets, positions): x_offset, y_offset, z_offset = offsets + positions = [(round(p[0], 2), round(p[1], 2), p[2]) + for p in positions] params = self.mesh_params params['min_x'] = min(positions, key=lambda p: p[0])[0] + x_offset params['max_x'] = max(positions, key=lambda p: p[0])[0] + x_offset |