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 <kevin@koconnor.net>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user