diff options
author | Viesturs Zariņš <viesturz@gmail.com> | 2023-10-19 19:28:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-19 13:28:16 -0400 |
commit | 6749985302fe002a9cb5672dab9badb11e4e3c36 (patch) | |
tree | eaef7309ffc28fe7270500bd338d830d48789db6 /klippy/kinematics/extruder.py | |
parent | 0c521b601d11ce236a98b4e557a0ab0a6d136b1a (diff) | |
download | kutter-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/kinematics/extruder.py')
-rw-r--r-- | klippy/kinematics/extruder.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/klippy/kinematics/extruder.py b/klippy/kinematics/extruder.py index ea422b6e..9c913bf1 100644 --- a/klippy/kinematics/extruder.py +++ b/klippy/kinematics/extruder.py @@ -70,15 +70,11 @@ class ExtruderStepper: self.stepper.set_trapq(extruder.get_trapq()) self.motion_queue = extruder_name def _set_pressure_advance(self, pressure_advance, smooth_time): - old_smooth_time = self.pressure_advance_smooth_time - if not self.pressure_advance: - old_smooth_time = 0. new_smooth_time = smooth_time if not pressure_advance: new_smooth_time = 0. toolhead = self.printer.lookup_object("toolhead") - toolhead.note_step_generation_scan_time(new_smooth_time * .5, - old_delay=old_smooth_time * .5) + toolhead.note_step_generation_scan_time(self, new_smooth_time * .5) ffi_main, ffi_lib = chelper.get_ffi() espa = ffi_lib.extruder_set_pressure_advance espa(self.sk_extruder, pressure_advance, new_smooth_time) |