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>
This commit is contained in:
Gareth Farrington
2025-03-20 16:55:33 -07:00
committed by GitHub
parent 06d65ef5ac
commit 272e815522
6 changed files with 63 additions and 14 deletions

View File

@@ -3278,6 +3278,10 @@ pin:
# A list of G-Code commands to execute when the button is released.
# G-Code templates are supported. The default is to not run any
# commands on a button release.
#debounce_delay:
# A period of time in seconds to debounce events prior to running the
# button gcode. If the button is pressed and released during this
# delay, the entire button press is ignored. Default is 0.
```
### [output_pin]
@@ -4641,6 +4645,11 @@ more information.
# dispatch and execution of the runout_gcode. It may be useful to
# increase this delay if OctoPrint exhibits strange pause behavior.
# Default is 0.5 seconds.
#debounce_delay:
# A period of time in seconds to debounce events prior to running the
# switch gcode. The switch must he held in a single state for at least
# this long to activate. If the switch is toggled on/off during this delay,
# the event is ignored. Default is 0.
#switch_pin:
# The pin on which the switch is connected. This parameter must be
# provided.