zcalibrate: clear the mesh and reset the offset before doing calibration

This commit is contained in:
alfrix 2024-01-01 12:35:25 -03:00
parent 906831a151
commit 469a13fd02

View File

@ -128,11 +128,14 @@ class Panel(ScreenPanel):
self.buttons['start'].set_sensitive(False)
if self._printer.get_stat("toolhead", "homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script("G28")
self._screen._ws.klippy.gcode_script("SET_GCODE_OFFSET Z=0")
if method == "mesh":
self._screen._ws.klippy.gcode_script("BED_MESH_CALIBRATE")
else:
self._screen._ws.klippy.gcode_script("BED_MESH_CLEAR")
if method == "probe":
self._move_to_position()
self._screen._ws.klippy.gcode_script("PROBE_CALIBRATE")
elif method == "mesh":
self._screen._ws.klippy.gcode_script("BED_MESH_CALIBRATE")
elif method == "delta":
self._screen._ws.klippy.gcode_script("DELTA_CALIBRATE")
elif method == "delta_manual":