aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/toolhead.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-01-02 18:58:45 -0500
committerKevin O'Connor <kevin@koconnor.net>2017-01-03 18:18:30 -0500
commitc87c090264fb9fd91bc87fbc63a05c5e53e3c484 (patch)
tree5f9a4dda5c129af06f436ff1e96b030103c16553 /klippy/toolhead.py
parentb26922978a1b7d0994e90572dcec6af120987b82 (diff)
downloadkutter-c87c090264fb9fd91bc87fbc63a05c5e53e3c484.tar.gz
kutter-c87c090264fb9fd91bc87fbc63a05c5e53e3c484.tar.xz
kutter-c87c090264fb9fd91bc87fbc63a05c5e53e3c484.zip
extruder: Calculate sane defaults for extrude only velocity and accel
Instead of requiring the user enter velocity and accel parameters for extrude only moves, calculate sane defaults from the printer's maximum velocity and accel. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r--klippy/toolhead.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index 614ab4b1..922749ec 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -179,7 +179,10 @@ 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
+ xy_halt = 0.005 * self.max_accel # XXX
+ self.kin.set_max_jerk(xy_halt, self.max_speed, self.max_accel)
+ if self.extruder is not None:
+ self.extruder.set_max_jerk(xy_halt, self.max_speed, self.max_accel)
self.kin.build_config()
# Print time tracking
def update_move_time(self, movetime):