diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2025-01-10 11:27:30 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2025-01-21 18:58:23 -0500 |
commit | 4aa550837fc170d0b77a0d461ca4f970b7bee7ae (patch) | |
tree | 7a185d949b9179c5f9b3977539e9cfda5ca7756e /klippy/kinematics/deltesian.py | |
parent | c72d73ec450119b5fbe13d98409037a21ae97101 (diff) | |
download | kutter-4aa550837fc170d0b77a0d461ca4f970b7bee7ae.tar.gz kutter-4aa550837fc170d0b77a0d461ca4f970b7bee7ae.tar.xz kutter-4aa550837fc170d0b77a0d461ca4f970b7bee7ae.zip |
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>
Diffstat (limited to 'klippy/kinematics/deltesian.py')
-rw-r--r-- | klippy/kinematics/deltesian.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/klippy/kinematics/deltesian.py b/klippy/kinematics/deltesian.py index d0865475..e0118b34 100644 --- a/klippy/kinematics/deltesian.py +++ b/klippy/kinematics/deltesian.py @@ -87,7 +87,7 @@ class DeltesianKinematics: self.axes_min = toolhead.Coord(*[l[0] for l in self.limits], e=0.) self.axes_max = toolhead.Coord(*[l[1] for l in self.limits], e=0.) self.homed_axis = [False] * 3 - self.set_position([0., 0., 0.], ()) + self.set_position([0., 0., 0.], "") def get_steppers(self): return [s for rail in self.rails for s in rail.get_steppers()] def _actuator_to_cartesian(self, sp): @@ -113,8 +113,9 @@ class DeltesianKinematics: def set_position(self, newpos, homing_axes): for rail in self.rails: rail.set_position(newpos) - for n in homing_axes: - self.homed_axis[n] = True + for axis_name in homing_axes: + axis = "xyz".index(axis_name) + self.homed_axis[axis] = True def clear_homing_state(self, axes): for i, _ in enumerate(self.limits): if i in axes: |