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
/usr/local/lib/python3.9/site-packages/RPi/core.py:530: UserWarning: invalid call to pwm_start(). Did you call PWM.__init__() on this channel?
warn("invalid call to pwm_start(). Did you call PWM.__init__() on this channel?")
I thought it was pibrella error, but it would work with original RPi.GPIO. pibrella uses PWM.start() multiple times when playing notes. Printed warning is highly misleading, because it DID construct PWM() object. It just uses start() method multiple times without stop(). I would suggest PWM class checking for started flag in start(), because it would know object were initialized.
The text was updated successfully, but these errors were encountered:
pemensik
added a commit
to pemensik/RPi.GPIO2
that referenced
this issue
Mar 7, 2021
Original C version allows repeated PWM.start() calls, because it just
ignores start() call once helper thread is running. Emulate such
behaviour and avoid printing warnings if already started.
Fixes issue underground-software#53.
pemensik
added a commit
to pemensik/RPi.GPIO2
that referenced
this issue
Mar 7, 2021
Original C version allows repeated PWM.start() calls, because it just
ignores start() call once helper thread is running. Emulate such
behaviour and avoid printing warnings if already started.
Fixes issue underground-software#53.
I was testing pibrella test example with RPi.GPIO2. It prints annoying warning:
I thought it was pibrella error, but it would work with original RPi.GPIO. pibrella uses PWM.start() multiple times when playing notes. Printed warning is highly misleading, because it DID construct PWM() object. It just uses start() method multiple times without stop(). I would suggest PWM class checking for started flag in start(), because it would know object were initialized.
The text was updated successfully, but these errors were encountered: