aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitram <33714214+Hywelmartin@users.noreply.github.com>2021-11-29 19:21:26 +0100
committerGitHub <noreply@github.com>2021-11-29 13:21:26 -0500
commit54acca37ba642e8af4aeb9bdc6b538a639eb0320 (patch)
treec7a86ff4e0f2123fa9a237a863e01b2233aaecd0
parent2b7d0bba428b573c7f9a3291cff6a1dc9da700ff (diff)
downloadkutter-54acca37ba642e8af4aeb9bdc6b538a639eb0320.tar.gz
kutter-54acca37ba642e8af4aeb9bdc6b538a639eb0320.tar.xz
kutter-54acca37ba642e8af4aeb9bdc6b538a639eb0320.zip
delta: max z-accel and speed ratio calculation for deltas (#4689)
Adding a possibility to use a lower z- acceleration. Signed-off-by: Martin Malmqvist <volcomosq@gmx.com>
-rw-r--r--docs/Config_Reference.md5
-rw-r--r--klippy/kinematics/delta.py5
2 files changed, 9 insertions, 1 deletions
diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md
index 5223c641..67d8d036 100644
--- a/docs/Config_Reference.md
+++ b/docs/Config_Reference.md
@@ -250,6 +250,11 @@ max_z_velocity:
# maximum speed of up/down moves (which require a higher step rate
# than other moves on a delta printer). The default is to use
# max_velocity for max_z_velocity.
+#max_z_accel:
+# This sets the maximum acceleration (in mm/s^2) of movement along
+# the z axis. Setting this may be useful if the printer can reach higher
+# acceleration on XY moves than Z moves (eg, when using input shaper).
+# The default is to use max_accel for max_z_accel.
#minimum_z_position: 0
# The minimum Z position that the user may command the head to move
# to. The default is 0.
diff --git a/klippy/kinematics/delta.py b/klippy/kinematics/delta.py
index 57d3db1f..4c5076f7 100644
--- a/klippy/kinematics/delta.py
+++ b/klippy/kinematics/delta.py
@@ -30,6 +30,8 @@ class DeltaKinematics:
self.max_z_velocity = config.getfloat(
'max_z_velocity', self.max_velocity,
above=0., maxval=self.max_velocity)
+ self.max_z_accel = config.getfloat('max_z_accel', self.max_accel,
+ above=0., maxval=self.max_accel)
# Read radius and arm lengths
self.radius = radius = config.getfloat('delta_radius', above=0.)
print_radius = config.getfloat('print_radius', radius, above=0.)
@@ -130,7 +132,8 @@ class DeltaKinematics:
limit_xy2 = -1.
if move.axes_d[2]:
z_ratio = move.move_d / abs(move.axes_d[2])
- move.limit_speed(self.max_z_velocity * z_ratio, move.accel)
+ move.limit_speed(self.max_z_velocity * z_ratio,
+ self.max_z_accel * z_ratio)
limit_xy2 = -1.
# Limit the speed/accel of this move if is is at the extreme
# end of the build envelope