diff options
author | Gareth Farrington <gareth@waves.ky> | 2025-03-20 16:55:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-20 19:55:33 -0400 |
commit | 272e815522b0bc8e0806e052b73a5cc1af979cd7 (patch) | |
tree | 8cbf07cad71d2113a55c45d53900ac3ad15ba8e2 /klippy/extras/filament_motion_sensor.py | |
parent | 06d65ef5ac139e2c84e7381c190ee2b1e4ec4237 (diff) | |
download | kutter-272e815522b0bc8e0806e052b73a5cc1af979cd7.tar.gz kutter-272e815522b0bc8e0806e052b73a5cc1af979cd7.tar.xz kutter-272e815522b0bc8e0806e052b73a5cc1af979cd7.zip |
buttons: Debounce gcode_button and filament_switch_sensor (#6848)
Add `debounce_delay` config option which sets the debounce time, defaults to 0
Signed-off-by: Gareth Farrington <gareth@waves.ky>
Diffstat (limited to 'klippy/extras/filament_motion_sensor.py')
-rw-r--r-- | klippy/extras/filament_motion_sensor.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/extras/filament_motion_sensor.py b/klippy/extras/filament_motion_sensor.py index fb886aa5..dd476d28 100644 --- a/klippy/extras/filament_motion_sensor.py +++ b/klippy/extras/filament_motion_sensor.py @@ -63,7 +63,7 @@ class EncoderSensor: def _extruder_pos_update_event(self, eventtime): extruder_pos = self._get_extruder_pos(eventtime) # Check for filament runout - self.runout_helper.note_filament_present( + self.runout_helper.note_filament_present(eventtime, extruder_pos < self.filament_runout_pos) return eventtime + CHECK_RUNOUT_TIMEOUT def encoder_event(self, eventtime, state): @@ -71,7 +71,7 @@ class EncoderSensor: self._update_filament_runout_pos(eventtime) # Check for filament insertion # Filament is always assumed to be present on an encoder event - self.runout_helper.note_filament_present(True) + self.runout_helper.note_filament_present(eventtime, True) def load_config_prefix(config): return EncoderSensor(config) |