force_move: Use strings for axes to clear in clear_homing_state()

Pass a string such as "xyz" to kin.clear_homing_state().  This makes
the parameter a little less cryptic.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-01-10 11:58:26 -05:00
parent 4aa550837f
commit 6ab253366c
14 changed files with 38 additions and 39 deletions

View File

@@ -72,10 +72,10 @@ class CartKinematics:
else:
rail = self.rails[axis]
self.limits[axis] = rail.get_range()
def clear_homing_state(self, axes):
for i, _ in enumerate(self.limits):
if i in axes:
self.limits[i] = (1.0, -1.0)
def clear_homing_state(self, clear_axes):
for axis, axis_name in enumerate("xyz"):
if axis_name in clear_axes:
self.limits[axis] = (1.0, -1.0)
def home_axis(self, homing_state, axis, rail):
# Determine movement
position_min, position_max = rail.get_range()