Only calls BED_MESH_CLEAR if bed_mesh enabled (#1460)

This commit is contained in:
Scott Mikutsky 2024-09-04 11:45:39 -04:00 committed by GitHub
parent 844eaba1ee
commit d99048d29f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -216,7 +216,8 @@ class Panel(ScreenPanel):
self.dropdown.set_sensitive(False)
self._screen._ws.klippy.gcode_script("SET_GCODE_OFFSET Z=0")
self._screen._ws.klippy.gcode_script("BED_MESH_CLEAR")
if self._printer.config_section_exists("bed_mesh"):
self._screen._ws.klippy.gcode_script("BED_MESH_CLEAR")
if self._printer.get_stat("toolhead", "homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script("G28")
self._move_to_position(*self._get_calibration_location())