Reset the mode if GPIO.getmode() returns None for any reason
This commit is contained in:
parent
9ffa04c666
commit
d5c2ae961a
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ class GpioPlugin(Plugin):
|
||||||
import RPi.GPIO as GPIO
|
import RPi.GPIO as GPIO
|
||||||
|
|
||||||
with self._init_lock:
|
with self._init_lock:
|
||||||
if self._initialized:
|
if self._initialized or GPIO.getmode():
|
||||||
return
|
return
|
||||||
|
|
||||||
GPIO.setmode(self.mode)
|
GPIO.setmode(self.mode)
|
||||||
|
|
Loading…
Reference in a new issue