aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/force_move.py7
-rw-r--r--klippy/extras/safe_z_home.py2
-rw-r--r--klippy/extras/stepper_enable.py2
3 files changed, 5 insertions, 6 deletions
diff --git a/klippy/extras/force_move.py b/klippy/extras/force_move.py
index 0b2187fd..24783c2c 100644
--- a/klippy/extras/force_move.py
+++ b/klippy/extras/force_move.py
@@ -131,11 +131,10 @@ class ForceMove:
x = gcmd.get_float('X', curpos[0])
y = gcmd.get_float('Y', curpos[1])
z = gcmd.get_float('Z', curpos[2])
- clear = gcmd.get('CLEAR', '').upper()
- axes = ['X', 'Y', 'Z']
- clear_axes = [axes.index(a) for a in axes if a in clear]
+ clear = gcmd.get('CLEAR', '').lower()
+ clear_axes = "".join([a for a in "xyz" if a in clear])
logging.info("SET_KINEMATIC_POSITION pos=%.3f,%.3f,%.3f clear=%s",
- x, y, z, ','.join((axes[i] for i in clear_axes)))
+ x, y, z, clear_axes)
toolhead.set_position([x, y, z, curpos[3]], homing_axes="xyz")
toolhead.get_kinematics().clear_homing_state(clear_axes)
diff --git a/klippy/extras/safe_z_home.py b/klippy/extras/safe_z_home.py
index 3ebaa13e..32b515b9 100644
--- a/klippy/extras/safe_z_home.py
+++ b/klippy/extras/safe_z_home.py
@@ -40,7 +40,7 @@ class SafeZHoming:
toolhead.set_position(pos, homing_axes="z")
toolhead.manual_move([None, None, self.z_hop],
self.z_hop_speed)
- toolhead.get_kinematics().clear_homing_state((2,))
+ toolhead.get_kinematics().clear_homing_state("z")
elif pos[2] < self.z_hop:
# If the Z axis is homed, and below z_hop, lift it to z_hop
toolhead.manual_move([None, None, self.z_hop],
diff --git a/klippy/extras/stepper_enable.py b/klippy/extras/stepper_enable.py
index 4e8f3bbb..2bad7555 100644
--- a/klippy/extras/stepper_enable.py
+++ b/klippy/extras/stepper_enable.py
@@ -94,7 +94,7 @@ class PrinterStepperEnable:
print_time = toolhead.get_last_move_time()
for el in self.enable_lines.values():
el.motor_disable(print_time)
- toolhead.get_kinematics().clear_homing_state((0, 1, 2))
+ toolhead.get_kinematics().clear_homing_state("xyz")
self.printer.send_event("stepper_enable:motor_off", print_time)
toolhead.dwell(DISABLE_STALL_TIME)
def motor_debug_enable(self, stepper, enable):