mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 09:40:36 +00:00
Check enable is not None, in case it's GPIO0
This commit is contained in:
@@ -814,7 +814,7 @@ class Motor(SourceMixin, CompositeDevice):
|
||||
'forward and backward pins must be provided'
|
||||
)
|
||||
PinClass = PWMOutputDevice if pwm else DigitalOutputDevice
|
||||
if enable:
|
||||
if enable is not None:
|
||||
super(Motor, self).__init__(
|
||||
forward_device=PinClass(forward),
|
||||
backward_device=PinClass(backward),
|
||||
|
||||
Reference in New Issue
Block a user