From 4aa550837fc170d0b77a0d461ca4f970b7bee7ae Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 10 Jan 2025 11:27:30 -0500 Subject: toolhead: Pass set_position() homing_axes parameter as a string Use strings such as "xyz" to specify which axes are to be considered homing during a set_position() call. This makes the parameter a little less cryptic. Signed-off-by: Kevin O'Connor --- klippy/extras/homing_override.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'klippy/extras/homing_override.py') diff --git a/klippy/extras/homing_override.py b/klippy/extras/homing_override.py index e498c8b8..0a987d59 100644 --- a/klippy/extras/homing_override.py +++ b/klippy/extras/homing_override.py @@ -46,11 +46,11 @@ class HomingOverride: # Calculate forced position (if configured) toolhead = self.printer.lookup_object('toolhead') pos = toolhead.get_position() - homing_axes = [] + homing_axes = "" for axis, loc in enumerate(self.start_pos): if loc is not None: pos[axis] = loc - homing_axes.append(axis) + homing_axes += "xyz"[axis] toolhead.set_position(pos, homing_axes=homing_axes) # Perform homing context = self.template.create_template_context() -- cgit v1.2.3-70-g09d2