aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/bed_mesh.py
diff options
context:
space:
mode:
authorRandell Hodges <rhodges@taxfodder.com>2021-08-17 14:30:14 -0500
committerGitHub <noreply@github.com>2021-08-17 15:30:14 -0400
commitf313a2294a2ed575a18e2490731cecba9bc1f685 (patch)
tree7beec97dc3e06d52e7bde612b8c6b7f5b4afc3c8 /klippy/extras/bed_mesh.py
parent8ad5cbfff594b6cc7ca1db04585aa20596923ac2 (diff)
downloadkutter-f313a2294a2ed575a18e2490731cecba9bc1f685.tar.gz
kutter-f313a2294a2ed575a18e2490731cecba9bc1f685.tar.xz
kutter-f313a2294a2ed575a18e2490731cecba9bc1f685.zip
bed_mesh: Added PROFILE name option (#4522)
Added optional PROFILE parameter to allow bed_mesh_calibrate to save the mesh directly into the provided profile name instead of default. If omitted, it will be stored in default. Signed-off-by: Randell L Hodges <rhodges@taxfodder.com>
Diffstat (limited to 'klippy/extras/bed_mesh.py')
-rw-r--r--klippy/extras/bed_mesh.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/klippy/extras/bed_mesh.py b/klippy/extras/bed_mesh.py
index 799bf84c..8a4f56da 100644
--- a/klippy/extras/bed_mesh.py
+++ b/klippy/extras/bed_mesh.py
@@ -265,6 +265,7 @@ class BedMeshCalibrate:
self.mesh_config = collections.OrderedDict()
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())
@@ -573,6 +574,7 @@ class BedMeshCalibrate:
return adj_pts
cmd_BED_MESH_CALIBRATE_help = "Perform Mesh Bed Leveling"
def cmd_BED_MESH_CALIBRATE(self, gcmd):
+ self._profile_name = gcmd.get('PROFILE', "default")
self.bedmesh.set_mesh(None)
self.update_config(gcmd)
self.probe_helper.start_probe(gcmd)
@@ -693,7 +695,7 @@ class BedMeshCalibrate:
raise self.gcode.error(str(e))
self.bedmesh.set_mesh(z_mesh)
self.gcode.respond_info("Mesh Bed Leveling Complete")
- self.bedmesh.save_profile("default")
+ self.bedmesh.save_profile(self._profile_name)
def _dump_points(self, probed_pts, corrected_pts, offsets):
# logs generated points with offset applied, points received
# from the finalize callback, and the list of corrected points