diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-12-01 15:29:26 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-12-01 18:17:54 -0500 |
commit | c49d3fdb17d6ba8f90099826355200d5219ab6b6 (patch) | |
tree | ad12f524dab0e3d100adcb8c12c603a686c7b7d9 /klippy/extruder.py | |
parent | fcaf359e897cea792ac28fc9140316c76eb87c40 (diff) | |
download | kutter-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/extruder.py')
-rw-r--r-- | klippy/extruder.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/klippy/extruder.py b/klippy/extruder.py index 0ca57eba..7d5a952d 100644 --- a/klippy/extruder.py +++ b/klippy/extruder.py @@ -11,11 +11,13 @@ class PrinterExtruder: self.heater = heater.PrinterHeater(printer, config) self.stepper = stepper.PrinterStepper(printer, config, 'extruder') self.pressure_advance = config.getfloat('pressure_advance', 0.) + self.max_e_velocity = config.getfloat('max_velocity') + self.max_e_accel = config.getfloat('max_accel') self.need_motor_enable = True self.extrude_pos = 0. def build_config(self): self.heater.build_config() - self.stepper.set_max_jerk(9999999.9) + self.stepper.set_max_jerk(9999999.9, 9999999.9) self.stepper.build_config() def motor_off(self, move_time): self.stepper.motor_enable(move_time, 0) @@ -28,7 +30,7 @@ class PrinterExtruder: and not move.axes_d[0] and not move.axes_d[1] and not move.axes_d[2]): # Extrude only move - limit accel and velocity - move.limit_speed(self.stepper.max_velocity, self.stepper.max_accel) + move.limit_speed(self.max_e_velocity, self.max_e_accel) def move(self, move_time, move): if self.need_motor_enable: self.stepper.motor_enable(move_time, 1) |