Fix arguments

This commit is contained in:
dadav committed 2019-11-07 07:37:41 +01:00
1 parent 15fa7039e8
commit 5712f5cd51
2 files changed
+3 -5

No files matched your search

+1 -3
View File
@@ -31,9 +31,7 @@ class GPIOButtons(plugins.Plugin):
# set gpio numbering
GPIO.setmode(GPIO.BCM)
for i in gpios:
gpio = list(i)[0]
command = i[gpio]
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)