aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/kinematics/polar.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/polar.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/polar.py')
-rw-r--r--klippy/kinematics/polar.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/klippy/kinematics/polar.py b/klippy/kinematics/polar.py
index deed26d0..fdd428a6 100644
--- a/klippy/kinematics/polar.py
+++ b/klippy/kinematics/polar.py
@@ -51,9 +51,12 @@ class PolarKinematics:
self.limit_z = self.rails[1].get_range()
if 0 in homing_axes and 1 in homing_axes:
self.limit_xy2 = self.rails[0].get_range()[1]**2
- def note_z_not_homed(self):
- # Helper for Safe Z Home
- self.limit_z = (1.0, -1.0)
+ def clear_homing_state(self, axes):
+ if 0 in axes or 1 in axes:
+ # X and Y cannot be cleared separately
+ self.limit_xy2 = -1.
+ if 2 in axes:
+ self.limit_z = (1.0, -1.0)
def _home_axis(self, homing_state, axis, rail):
# Determine movement
position_min, position_max = rail.get_range()
@@ -86,8 +89,7 @@ class PolarKinematics:
if home_z:
self._home_axis(homing_state, 2, self.rails[1])
def _motor_off(self, print_time):
- self.limit_z = (1.0, -1.0)
- self.limit_xy2 = -1.
+ self.clear_homing_state((0, 1, 2))
def check_move(self, move):
end_pos = move.end_pos
xy2 = end_pos[0]**2 + end_pos[1]**2