aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/delta.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-12-01 15:29:26 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-12-01 18:17:54 -0500
commitc49d3fdb17d6ba8f90099826355200d5219ab6b6 (patch)
treead12f524dab0e3d100adcb8c12c603a686c7b7d9 /klippy/delta.py
parentfcaf359e897cea792ac28fc9140316c76eb87c40 (diff)
downloadkutter-c49d3fdb17d6ba8f90099826355200d5219ab6b6.tar.gz
kutter-c49d3fdb17d6ba8f90099826355200d5219ab6b6.tar.xz
kutter-c49d3fdb17d6ba8f90099826355200d5219ab6b6.zip
toolhead: Specify maximum acceleration and velocity in toolhead class
Change the config file so the maximum accel and velocity are specified in the "printer" section instead of the individual "stepper" sections. The underlying code limits the velocity and accel of the toolhead relative to the print object, so it makes sense to configure the system that was as well. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/delta.py')
-rw-r--r--klippy/delta.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/klippy/delta.py b/klippy/delta.py
index 27290aac..3b2ad674 100644
--- a/klippy/delta.py
+++ b/klippy/delta.py
@@ -28,17 +28,14 @@ class DeltaKinematics:
(cos(210.)*radius, sin(210.)*radius),
(cos(330.)*radius, sin(330.)*radius),
(cos(90.)*radius, sin(90.)*radius)]
- def build_config(self):
+ def set_max_jerk(self, max_xy_halt_velocity, max_accel):
+ # XXX - this sets conservative values
for stepper in self.steppers:
- stepper.set_max_jerk(0.005 * stepper.max_accel) # XXX
+ stepper.set_max_jerk(max_xy_halt_velocity, max_accel)
+ def build_config(self):
for stepper in self.steppers:
stepper.build_config()
self.set_position([0., 0., 0.])
- def get_max_speed(self):
- # XXX - this returns conservative values
- max_xy_speed = min(s.max_velocity for s in self.steppers)
- max_xy_accel = min(s.max_accel for s in self.steppers)
- return max_xy_speed, max_xy_accel
def cartesian_to_actuator(self, coord):
return [int((math.sqrt(self.arm_length2
- (self.towers[i][0] - coord[0])**2