aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/toolhead.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/toolhead.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/toolhead.py')
-rw-r--r--klippy/toolhead.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index e173f279..ec215d6b 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -162,7 +162,8 @@ class ToolHead:
kintypes = {'cartesian': cartesian.CartKinematics,
'delta': delta.DeltaKinematics}
self.kin = config.getchoice('kinematics', kintypes)(printer, config)
- self.max_speed, self.max_accel = self.kin.get_max_speed()
+ self.max_speed = config.getfloat('max_velocity')
+ self.max_accel = config.getfloat('max_accel')
self.junction_deviation = config.getfloat('junction_deviation', 0.02)
self.move_queue = MoveQueue()
self.commanded_pos = [0., 0., 0., 0.]
@@ -176,6 +177,7 @@ class ToolHead:
self.motor_off_time = self.reactor.NEVER
self.flush_timer = self.reactor.register_timer(self.flush_handler)
def build_config(self):
+ self.kin.set_max_jerk(0.005 * self.max_accel, self.max_accel) # XXX
self.kin.build_config()
# Print time tracking
def update_move_time(self, movetime):