From 5f5dfbaa7fef33e1ba40a3eb238ed744ffc9af75 Mon Sep 17 00:00:00 2001 From: Arksine Date: Tue, 22 Dec 2020 14:29:37 -0500 Subject: [PATCH] bed_mesh: Allow user to clear the relative_reference_index via gcode If a negative number is specified for the RELATIVE_REFERENCE_INDEX parameter clear the internal relative_reference_index. Signed-off-by: Eric Callahan --- klippy/extras/bed_mesh.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/klippy/extras/bed_mesh.py b/klippy/extras/bed_mesh.py index cb9e719c..1c25a1ea 100644 --- a/klippy/extras/bed_mesh.py +++ b/klippy/extras/bed_mesh.py @@ -404,6 +404,8 @@ class BedMeshCalibrate: if 'RELATIVE_REFERENCE_INDEX' in params: self.relative_reference_index = gcmd.get_int( 'RELATIVE_REFERENCE_INDEX') + if self.relative_reference_index < 0: + self.relative_reference_index = None need_cfg_update = True if self.radius is not None: if "MESH_RADIUS" in params: