From c49d3fdb17d6ba8f90099826355200d5219ab6b6 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 1 Dec 2016 15:29:26 -0500 Subject: 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 --- klippy/delta.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'klippy/delta.py') 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 -- cgit v1.2.3-70-g09d2