verhindern von doppelten ausführungen

i had with the old value 250 many double executions, despite short push switches. The new value 600 prevents this. Tested with volume buttons.
This commit is contained in:
xenDE 2019-11-09 19:50:47 +01:00 committed by GitHub
parent 38144a7abb
commit 25eee18e7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -34,5 +34,5 @@ class GPIOButtons(plugins.Plugin):
for gpio, command in gpios.items():
self.ports[gpio] = command
GPIO.setup(gpio, GPIO.IN, GPIO.PUD_UP)
GPIO.add_event_detect(gpio, GPIO.FALLING, callback=self.runCommand, bouncetime=250)
GPIO.add_event_detect(gpio, GPIO.FALLING, callback=self.runCommand, bouncetime=600)
logging.info("Added command: %s to GPIO #%d", command, gpio)