From 272e815522b0bc8e0806e052b73a5cc1af979cd7 Mon Sep 17 00:00:00 2001 From: Gareth Farrington Date: Thu, 20 Mar 2025 16:55:33 -0700 Subject: 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 --- docs/Config_Reference.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/Config_Reference.md') diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md index 44f6431f..86067475 100644 --- a/docs/Config_Reference.md +++ b/docs/Config_Reference.md @@ -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. -- cgit v1.2.3-70-g09d2