aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/input_shaper.py
diff options
context:
space:
mode:
authorViesturs Zariņš <viesturz@gmail.com>2023-10-19 19:28:16 +0200
committerGitHub <noreply@github.com>2023-10-19 13:28:16 -0400
commit6749985302fe002a9cb5672dab9badb11e4e3c36 (patch)
treeeaef7309ffc28fe7270500bd338d830d48789db6 /klippy/extras/input_shaper.py
parent0c521b601d11ce236a98b4e557a0ab0a6d136b1a (diff)
downloadkutter-6749985302fe002a9cb5672dab9badb11e4e3c36.tar.gz
kutter-6749985302fe002a9cb5672dab9badb11e4e3c36.tar.xz
kutter-6749985302fe002a9cb5672dab9badb11e4e3c36.zip
toolhead: Use dict for step generation flush times. (#6303)
Makes the API to extruder and input shaper more robust, avoiding the need to track the old delay. Signed-off-by: Viesturs Zariņš <viesturz@gmail.com>
Diffstat (limited to 'klippy/extras/input_shaper.py')
-rw-r--r--klippy/extras/input_shaper.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/klippy/extras/input_shaper.py b/klippy/extras/input_shaper.py
index 7f37d302..3edd8478 100644
--- a/klippy/extras/input_shaper.py
+++ b/klippy/extras/input_shaper.py
@@ -135,16 +135,13 @@ class InputShaper:
is_sk = self._get_input_shaper_stepper_kinematics(s)
if is_sk is None:
continue
- old_delay = ffi_lib.input_shaper_get_step_generation_window(is_sk)
for shaper in self.shapers:
if shaper in failed_shapers:
continue
if not shaper.set_shaper_kinematics(is_sk):
failed_shapers.append(shaper)
new_delay = ffi_lib.input_shaper_get_step_generation_window(is_sk)
- if old_delay != new_delay:
- self.toolhead.note_step_generation_scan_time(new_delay,
- old_delay)
+ self.toolhead.note_step_generation_scan_time(self, new_delay)
if failed_shapers:
error = error or self.printer.command_error
raise error("Failed to configure shaper(s) %s with given parameters"