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:
@@ -75,9 +75,10 @@ class HybridCoreXZKinematics:
|
||||
else:
|
||||
rail = self.rails[axis]
|
||||
self.limits[axis] = 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_axis(self, homing_state, axis, rail):
|
||||
position_min, position_max = rail.get_range()
|
||||
hi = rail.get_homing_info()
|
||||
@@ -97,7 +98,7 @@ class HybridCoreXZKinematics:
|
||||
else:
|
||||
self.home_axis(homing_state, axis, self.rails[axis])
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user