only cleanup the gpios in use instead of all gpios

This commit is contained in:
raven-worx 2021-12-27 01:05:48 +01:00
parent 72370cb1f2
commit 3c2cb400c5

View file

@ -145,7 +145,7 @@ class JetsonNano:
self.GPIO.output(self.RST_PIN, 0)
self.GPIO.output(self.DC_PIN, 0)
self.GPIO.cleanup()
self.GPIO.cleanup([self.RST_PIN, self.DC_PIN, self.CS_PIN, self.BUSY_PIN])
if os.path.exists('/sys/bus/platform/drivers/gpiomem-bcm2835'):