Reset the mode if GPIO.getmode() returns None for any reason

This commit is contained in:
Fabio Manganiello 2019-12-23 18:40:39 +01:00
parent 9ffa04c666
commit d5c2ae961a
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class GpioPlugin(Plugin):
import RPi.GPIO as GPIO
with self._init_lock:
if self._initialized:
if self._initialized or GPIO.getmode():
return
GPIO.setmode(self.mode)