aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/kinematics/corexy.py
diff options
context:
space:
mode:
authorDennis Marttinen <38858901+twelho@users.noreply.github.com>2025-01-10 15:41:09 +0000
committerGitHub <noreply@github.com>2025-01-10 10:41:09 -0500
commit7083879700800710c624c0bf08220215ba5f4a83 (patch)
tree03595e28aca8238f9f8e727ba6e1d43aed52b2e6 /klippy/kinematics/corexy.py
parent9ca71d8608f4a6013c3453ffa9e75c3739078712 (diff)
downloadkutter-7083879700800710c624c0bf08220215ba5f4a83.tar.gz
kutter-7083879700800710c624c0bf08220215ba5f4a83.tar.xz
kutter-7083879700800710c624c0bf08220215ba5f4a83.zip
force_move: Implement CLEAR for SET_KINEMATIC_POSITION (#6262)
`CLEAR` clears the homing status (resets the axis limits) without turning off the motors. This is particularly useful when implementing safe Z homing in `[homing_override]` on printers with multiple independent Z steppers (where `FORCE_MOVE` can't be used). Signed-off-by: Dennis Marttinen <twelho@welho.tech>
Diffstat (limited to 'klippy/kinematics/corexy.py')
-rw-r--r--klippy/kinematics/corexy.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/klippy/kinematics/corexy.py b/klippy/kinematics/corexy.py
index d3b75500..dc80d1ee 100644
--- a/klippy/kinematics/corexy.py
+++ b/klippy/kinematics/corexy.py
@@ -43,9 +43,10 @@ class CoreXYKinematics:
rail.set_position(newpos)
if i in homing_axes:
self.limits[i] = rail.get_range()
- def note_z_not_homed(self):
- # Helper for Safe Z Home
- self.limits[2] = (1.0, -1.0)
+ def clear_homing_state(self, axes):
+ for i, _ in enumerate(self.limits):
+ if i in axes:
+ self.limits[i] = (1.0, -1.0)
def home(self, homing_state):
# Each axis is homed independently and in order
for axis in homing_state.get_axes():
@@ -63,7 +64,7 @@ class CoreXYKinematics:
# Perform homing
homing_state.home_rails([rail], forcepos, homepos)
def _motor_off(self, print_time):
- self.limits = [(1.0, -1.0)] * 3
+ self.clear_homing_state((0, 1, 2))
def _check_endstops(self, move):
end_pos = move.end_pos
for i in (0, 1, 2):