zcalibrate: add support for axis twist compensation

This commit is contained in:
alfrix 2024-04-16 14:02:03 -03:00
parent 761548f96e
commit d23ca4557a

View File

@ -133,6 +133,9 @@ class Panel(ScreenPanel):
# Since probes may not be accturate enough for deltas, always show the manual method
self._add_button("Delta Manual", "delta_manual", pobox)
functions.append("delta_manual")
if "AXIS_TWIST_COMPENSATION_CALIBRATE" in self._printer.available_commands:
self._add_button("Axis Twist Compensation", "axis_twist", pobox)
functions.append("axis_twist")
self.labels['popover'].add(pobox)
if len(functions) > 1:
@ -173,6 +176,8 @@ class Panel(ScreenPanel):
self._screen._ws.klippy.gcode_script("DELTA_CALIBRATE METHOD=manual")
elif method == "endstop":
self._screen._ws.klippy.gcode_script("Z_ENDSTOP_CALIBRATE")
elif method == "axis_twist":
self._screen._ws.klippy.gcode_script("AXIS_TWIST_COMPENSATION_CALIBRATE")
def _move_to_position(self, x, y):
if not x or not y: