You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time GPIOPWM.on() is called, it tries to create a new PWM.GPIO object, attached to the actor's GPIO pin (line 56 of modules/base_plugins/gpio_actor/init.py). This raises an exception as PWM.GPIO does not like to create a new object attached to a pin that has already been assigned, and requires that the control be pressed a second time to switch the actor on.
The simple way to prevent this is to check whether the PWM object exists with if self.p is None: and only try create the PWM object if it doesn't already exist.
The text was updated successfully, but these errors were encountered:
PaulKGrimes
added a commit
to PaulKGrimes/craftbeerpi3
that referenced
this issue
Mar 1, 2020
Every time GPIOPWM.on() is called, it tries to create a new PWM.GPIO object, attached to the actor's GPIO pin (line 56 of modules/base_plugins/gpio_actor/init.py). This raises an exception as PWM.GPIO does not like to create a new object attached to a pin that has already been assigned, and requires that the control be pressed a second time to switch the actor on.
The simple way to prevent this is to check whether the PWM object exists with
if self.p is None:
and only try create the PWM object if it doesn't already exist.The text was updated successfully, but these errors were encountered: