aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/delta.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-12-01 16:04:48 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-12-01 18:17:54 -0500
commit71b4923208b0fda7810d923ae8e2a178030eebac (patch)
treebf6ec175ee1853248198acbab46e8549986f9094 /klippy/delta.py
parentc49d3fdb17d6ba8f90099826355200d5219ab6b6 (diff)
downloadkutter-71b4923208b0fda7810d923ae8e2a178030eebac.tar.gz
kutter-71b4923208b0fda7810d923ae8e2a178030eebac.tar.xz
kutter-71b4923208b0fda7810d923ae8e2a178030eebac.zip
delta: Support limiting the maximum velocity of z moves
On a delta printer, z moves require the mcu to support the greatest number of steps per second. However, z moves are rare, so it makes sense to limit the velocity of z moves separately from the velocity of normal xy moves. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/delta.py')
-rw-r--r--klippy/delta.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/klippy/delta.py b/klippy/delta.py
index 3b2ad674..ef7dbde7 100644
--- a/klippy/delta.py
+++ b/klippy/delta.py
@@ -14,6 +14,7 @@ class DeltaKinematics:
printer, config.getsection('stepper_' + n), n)
for n in ['a', 'b', 'c']]
self.need_motor_enable = True
+ self.max_z_velocity = config.getfloat('max_z_velocity', 9999999.9)
radius = config.getfloat('delta_radius')
arm_length = config.getfloat('delta_arm_length')
self.arm_length2 = arm_length**2
@@ -122,6 +123,8 @@ class DeltaKinematics:
if end_pos[2] > self.limit_z:
if end_pos[2] > self.max_z or xy2 > (self.max_z - end_pos[2])**2:
raise homing.EndstopMoveError(end_pos)
+ if move.axes_d[2]:
+ move.limit_speed(self.max_z_velocity, 9999999.9)
def move_z(self, move_time, move):
if not move.axes_d[2]:
return