mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Merge pull request #566 from xenDE/master
prevent double execution on gpio buttons
This commit is contained in:
@ -34,5 +34,5 @@ class GPIOButtons(plugins.Plugin):
|
|||||||
for gpio, command in gpios.items():
|
for gpio, command in gpios.items():
|
||||||
self.ports[gpio] = command
|
self.ports[gpio] = command
|
||||||
GPIO.setup(gpio, GPIO.IN, GPIO.PUD_UP)
|
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)
|
logging.info("Added command: %s to GPIO #%d", command, gpio)
|
||||||
|
Reference in New Issue
Block a user