aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/toolhead.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-06-15 12:00:33 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-06-15 12:05:45 -0400
commitefe63d5efe3ab6ca9e08a42dceca0607d7fa0915 (patch)
tree0065bd3689a9c7a56e1815d2c263b44d3c1d7bd1 /klippy/toolhead.py
parent4ec1244c31af2e621eec9a4bbfa59684c8dbf93f (diff)
downloadkutter-efe63d5efe3ab6ca9e08a42dceca0607d7fa0915.tar.gz
kutter-efe63d5efe3ab6ca9e08a42dceca0607d7fa0915.tar.xz
kutter-efe63d5efe3ab6ca9e08a42dceca0607d7fa0915.zip
toolhead: Add support for the M204 command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r--klippy/toolhead.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index f62a86fe..c1f41b85 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -238,6 +238,7 @@ class ToolHead:
gcode = printer.lookup_object('gcode')
gcode.register_command('SET_VELOCITY_LIMIT', self.cmd_SET_VELOCITY_LIMIT,
desc=self.cmd_SET_VELOCITY_LIMIT_help)
+ gcode.register_command('M204', self.cmd_M204)
# Print time tracking
def update_move_time(self, movetime):
self.print_time += movetime
@@ -436,6 +437,10 @@ class ToolHead:
junction_deviation))
self.printer.set_rollover_info("toolhead", "toolhead: %s" % (msg,))
gcode.respond_info(msg)
+ def cmd_M204(self, params):
+ gcode = self.printer.lookup_object('gcode')
+ accel = gcode.get_float('S', params, above=0.)
+ self.max_accel = min(accel, self.config_max_accel)
def add_printer_objects(printer, config):
printer.add_object('toolhead', ToolHead(printer, config))