Merge pull request from xenDE/master

prevent double execution on gpio buttons
This commit is contained in:
evilsocket 2019-11-10 13:10:49 +01:00 committed by GitHub
commit a5ed09cd08
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)