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>
This commit is contained in:
Dennis Marttinen
2025-01-10 15:41:09 +00:00
committed by GitHub
parent 9ca71d8608
commit 7083879700
16 changed files with 77 additions and 46 deletions

View File

@@ -88,6 +88,11 @@ class RotaryDeltaKinematics:
self.limit_xy2 = -1.
if tuple(homing_axes) == (0, 1, 2):
self.need_home = False
def clear_homing_state(self, axes):
# Clearing homing state for each axis individually is not implemented
if 0 in axes or 1 in axes or 2 in axes:
self.limit_xy2 = -1
self.need_home = True
def home(self, homing_state):
# All axes are homed simultaneously
homing_state.set_axes([0, 1, 2])
@@ -97,8 +102,7 @@ class RotaryDeltaKinematics:
forcepos[2] = -1.
homing_state.home_rails(self.rails, forcepos, self.home_position)
def _motor_off(self, print_time):
self.limit_xy2 = -1.
self.need_home = True
self.clear_homing_state((0, 1, 2))
def check_move(self, move):
end_pos = move.end_pos
end_xy2 = end_pos[0]**2 + end_pos[1]**2