Merge pull request from xenDE/patch-3

fix gpio_buttons plugin: gpio needs to be a number
This commit is contained in:
evilsocket 2019-11-23 11:30:28 +01:00 committed by GitHub
commit 7de5121033
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -32,6 +32,7 @@ class GPIOButtons(plugins.Plugin):
GPIO.setmode(GPIO.BCM)
for gpio, command in gpios.items():
gpio = int(gpio)
self.ports[gpio] = command
GPIO.setup(gpio, GPIO.IN, GPIO.PUD_UP)
GPIO.add_event_detect(gpio, GPIO.FALLING, callback=self.runCommand, bouncetime=600)