zcalibrate: Check for homed axes

This commit is contained in:
Jordan Ruthe committed 2020-11-18 05:56:09 -05:00
1 parent 6e8f904983
commit 2626899d53
1 file changed
+3 -2
+3 -2
View File
@@ -80,7 +80,8 @@ class ZCalibratePanel(ScreenPanel):
self._screen.add_subscription(panel_name)
def activate(self):
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
if self._screen.printer.get_stat("toolhead","homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
self._screen._ws.klippy.gcode_script(KlippyGcodes.PROBE_CALIBRATE)
def process_update(self, data):
@@ -119,4 +120,4 @@ class ZCalibratePanel(ScreenPanel):
def accept(self, widget):
logger.info("Accepting Z calibrate")
self._screen._ws.klippy.gcode_script(KlippyGcodes.PROBE_ACCEPT)
self._screen._ws.klippy.gcode_script(KlippyGcodes.SAVE_CONFIG)
#self._screen._ws.klippy.gcode_script(KlippyGcodes.SAVE_CONFIG)