mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
debounce for gpiod AioReader
This commit is contained in:
@@ -227,7 +227,9 @@ def _patch_dynamic( # pylint: disable=too-many-locals
|
||||
"min_delay": Option(0.1, type=valid_float_f01),
|
||||
"max_delay": Option(0.1, type=valid_float_f01),
|
||||
},
|
||||
} if mode == UserGpioModes.OUTPUT else {})
|
||||
} if mode == UserGpioModes.OUTPUT else { # input
|
||||
"debounce": Option(0.1, type=valid_float_f0),
|
||||
})
|
||||
}
|
||||
|
||||
rebuild = True
|
||||
|
||||
@@ -81,7 +81,7 @@ class _GpioInput:
|
||||
self.__inverted: bool = config.inverted
|
||||
|
||||
self.__driver = driver
|
||||
self.__driver.register_input(self.__pin)
|
||||
self.__driver.register_input(self.__pin, config.debounce)
|
||||
|
||||
def get_scheme(self) -> Dict:
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user