aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/input_shaper.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2023-10-21 15:45:47 -0400
committerKevin O'Connor <kevin@koconnor.net>2023-10-21 15:46:08 -0400
commitf7567a0db954eabe4c6b8da3f73ce68693698646 (patch)
tree0c3fdca33f47cae492cded24cd427ea37399f307 /klippy/extras/input_shaper.py
parent6749985302fe002a9cb5672dab9badb11e4e3c36 (diff)
downloadkutter-f7567a0db954eabe4c6b8da3f73ce68693698646.tar.gz
kutter-f7567a0db954eabe4c6b8da3f73ce68693698646.tar.xz
kutter-f7567a0db954eabe4c6b8da3f73ce68693698646.zip
Revert "toolhead: Use dict for step generation flush times. (#6303)"
This reverts commit 6749985302fe002a9cb5672dab9badb11e4e3c36. A defect was found in the above commit (the input shaper code calls note_step_generateion_scan_time() for many steppers, so the input_shaper class can't be used as the index). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/input_shaper.py')
-rw-r--r--klippy/extras/input_shaper.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/klippy/extras/input_shaper.py b/klippy/extras/input_shaper.py
index 3edd8478..7f37d302 100644
--- a/klippy/extras/input_shaper.py
+++ b/klippy/extras/input_shaper.py
@@ -135,13 +135,16 @@ 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)
- self.toolhead.note_step_generation_scan_time(self, new_delay)
+ if old_delay != new_delay:
+ self.toolhead.note_step_generation_scan_time(new_delay,
+ old_delay)
if failed_shapers:
error = error or self.printer.command_error
raise error("Failed to configure shaper(s) %s with given parameters"