aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/bed_mesh.py
diff options
context:
space:
mode:
authorEric Callahan <arksine.code@gmail.com>2023-06-04 17:42:50 -0400
committerKevinOConnor <kevin@koconnor.net>2023-06-20 11:48:17 -0400
commit775092fc016784317dbd443c7d6c31de9cc518af (patch)
tree8bf3be2b7eb10adbf22ecb73fa826bef076f6c1f /klippy/extras/bed_mesh.py
parent0245073c550bba95f071893c68120dbe2a5d8219 (diff)
downloadkutter-775092fc016784317dbd443c7d6c31de9cc518af.tar.gz
kutter-775092fc016784317dbd443c7d6c31de9cc518af.tar.xz
kutter-775092fc016784317dbd443c7d6c31de9cc518af.zip
bed_mesh: generate new points before each calibration
When mesh parameters change the substituted indices need to be updated, even when using the default point set. Always generate new points to perform this update rather than cache the "orig_points". Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Diffstat (limited to 'klippy/extras/bed_mesh.py')
-rw-r--r--klippy/extras/bed_mesh.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/extras/bed_mesh.py b/klippy/extras/bed_mesh.py
index 92c3ac54..eb7002b4 100644
--- a/klippy/extras/bed_mesh.py
+++ b/klippy/extras/bed_mesh.py
@@ -295,7 +295,6 @@ class BedMeshCalibrate:
self._init_mesh_config(config)
self._generate_points(config.error)
self._profile_name = None
- self.orig_points = self.points
self.probe_helper = probe.ProbePointsHelper(
config, self.probe_finalize, self._get_adjusted_points())
self.probe_helper.minimum_points(3)
@@ -349,6 +348,7 @@ class BedMeshCalibrate:
self.points = points
if not self.faulty_regions:
return
+ self.substituted_indices.clear()
# Check to see if any points fall within faulty regions
last_y = self.points[0][1]
is_reversed = False
@@ -581,7 +581,7 @@ class BedMeshCalibrate:
in self.mesh_config.items()])
logging.info("Updated Mesh Configuration:\n" + msg)
else:
- self.points = self.orig_points
+ self._generate_points(gcmd.error)
pts = self._get_adjusted_points()
self.probe_helper.update_probe_points(pts, 3)
def _get_adjusted_points(self):