From 6ab253366cca1b5d2d8e9dec6ea243c0853612f7 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 10 Jan 2025 11:58:26 -0500 Subject: 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 --- klippy/kinematics/corexz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'klippy/kinematics/corexz.py') diff --git a/klippy/kinematics/corexz.py b/klippy/kinematics/corexz.py index 34def72a..8d3e027c 100644 --- a/klippy/kinematics/corexz.py +++ b/klippy/kinematics/corexz.py @@ -41,10 +41,10 @@ class CoreXZKinematics: rail.set_position(newpos) if "xyz"[i] in homing_axes: self.limits[i] = 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(self, homing_state): # Each axis is homed independently and in order for axis in homing_state.get_axes(): -- cgit v1.2.3-70-g09d2