mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-24 23:24:01 -06:00
delta: Allow the user to specify a minimum z position
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
978777f09f
commit
6c252d30f5
2 changed files with 5 additions and 1 deletions
|
@ -33,6 +33,7 @@ class DeltaKinematics:
|
|||
for s, arm2 in zip(self.steppers, self.arm2)]
|
||||
self.limit_xy2 = -1.
|
||||
self.max_z = min([s.position_endstop for s in self.steppers])
|
||||
self.min_z = config.getfloat('minimum_z_position', 0, maxval=self.max_z)
|
||||
self.limit_z = min([ep - arm
|
||||
for ep, arm in zip(self.endstops, arm_lengths)])
|
||||
logging.info(
|
||||
|
@ -148,7 +149,7 @@ class DeltaKinematics:
|
|||
limit_xy2 = self.max_xy2
|
||||
if end_pos[2] > self.limit_z:
|
||||
limit_xy2 = min(limit_xy2, (self.max_z - end_pos[2])**2)
|
||||
if xy2 > limit_xy2 or end_pos[2] < 0. or end_pos[2] > self.max_z:
|
||||
if xy2 > limit_xy2 or end_pos[2] < self.min_z or end_pos[2] > self.max_z:
|
||||
raise homing.EndstopMoveError(end_pos)
|
||||
if move.axes_d[2]:
|
||||
move.limit_speed(self.max_z_velocity, move.accel)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue