gpio: only setmode if it hasn't been set yet

This commit is contained in:
2023-10-29 20:56:03 -03:00
parent 11b2c845ac
commit 7df3639923
4 changed files with 17 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import signal
def _cleanup(sig, frame):
def _cleanup(*args, **kwargs):
import sys
import RPi.GPIO as gpio
gpio.cleanup()