diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-09-02 12:22:43 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-09-02 12:22:43 -0400 |
commit | 165317e33ff874fdf6cdb2734cc5aea7e84b2729 (patch) | |
tree | 5b503239b439709c45e1a7f2d37dcdd15a491462 /klippy/toolhead.py | |
parent | 5632cf6d77b79cf0d1df2ab61881ee3828af7806 (diff) | |
download | kutter-165317e33ff874fdf6cdb2734cc5aea7e84b2729.tar.gz kutter-165317e33ff874fdf6cdb2734cc5aea7e84b2729.tar.xz kutter-165317e33ff874fdf6cdb2734cc5aea7e84b2729.zip |
toolhead: Support M204 with P and T instead of S
Recent versions of Slic3r now send M204 with P and T instead of with
S, so support that.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r-- | klippy/toolhead.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py index 4999a1ec..abc0874a 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -448,7 +448,13 @@ class ToolHead: gcode.respond_info(msg) def cmd_M204(self, params): gcode = self.printer.lookup_object('gcode') - accel = gcode.get_float('S', params, above=0.) + if 'P' in params and 'T' in params and 'S' not in params: + # Use minimum of P and T for accel + accel = min(gcode.get_float('P', params, above=0.), + gcode.get_float('T', params, above=0.)) + else: + # Use S for accel + accel = gcode.get_float('S', params, above=0.) self.max_accel = min(accel, self.config_max_accel) self._calc_junction_deviation() |