aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/Bed_Mesh.md12
-rw-r--r--klippy/extras/bed_mesh.py4
2 files changed, 11 insertions, 5 deletions
diff --git a/docs/Bed_Mesh.md b/docs/Bed_Mesh.md
index a13482fa..aebcc21b 100644
--- a/docs/Bed_Mesh.md
+++ b/docs/Bed_Mesh.md
@@ -347,13 +347,17 @@ are identified in green.
### Calibration
-`BED_MESH_CALIBRATE METHOD=[manual | automatic] [<probe_parameter>=<value>]
+`BED_MESH_CALIBRATE PROFILE=name METHOD=[manual | automatic] [<probe_parameter>=<value>]
[<mesh_parameter>=<value>]`\
+_Default Profile: default_\
_Default Method: automatic if a probe is detected, otherwise manual_
-Initiates the probing procedure for Bed Mesh Calibration. If `METHOD=manual`
-is selected then manual probing will occur. When switching between automatic
-and manual probing the generated mesh points will automatically be adjusted.
+Initiates the probing procedure for Bed Mesh Calibration.
+
+The mesh will be saved into a profile specified by the `PROFILE` parameter,
+or `default` if unspecified. If `METHOD=manual` is selected then manual probing
+will occur. When switching between automatic and manual probing the generated
+mesh points will automatically be adjusted.
It is possible to specify mesh parameters to modify the probed area. The
following parameters are available:
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