mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-16 11:17:52 -06:00
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>
This commit is contained in:
parent
fcaf359e89
commit
c49d3fdb17
8 changed files with 52 additions and 53 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue