Skip to content

Fix error caused by non-existent variable_frequency property #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 4, 2023

Conversation

makermelissa
Copy link
Collaborator

This is in regards to https://forums.adafruit.com/viewtopic.php?p=958532.

This fixes an issue introduced by #67 because the variable_frequency is not a property of PWMOut according to https://docs.circuitpython.org/en/latest/shared-bindings/pwmio/index.html nor is it a property of the Seesaw PWMOut which is used on the Raspberry Pi. I'm not sure if it exists in certain instances, so I just added a check if it has the attribute before trying to use it.

@makermelissa makermelissa requested a review from a team February 3, 2023 03:01
@tannewt
Copy link
Member

tannewt commented Feb 3, 2023

@tekktrik added it in 4a50113. I'm not sure why. I think you need to try/except around setting the frequency to determine it.

@tekktrik
Copy link
Member

tekktrik commented Feb 3, 2023

I was addressing #66 with that commit I believe.

@makermelissa
Copy link
Collaborator Author

makermelissa commented Feb 3, 2023

I think you need to try/except around setting the frequency to determine it.

Ok yeah, a try/except should work more consistently to see if variable_frequency is indeed enabled.

I was addressing #66 with that commit I believe.

I think Scott meant, he didn't know why you used variable_frequency as a property instead of a try/except block.

Copy link
Member

@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I didn't realize that variable_frequency wasn't an accessible property.

@tekktrik tekktrik merged commit 4c36fa4 into adafruit:main Feb 4, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 5, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_BME680 to 3.4.12 from 3.4.11:
  > Merge pull request adafruit/Adafruit_CircuitPython_BME680#58 from tekktrik/dev/add-opp-deps
  > Add upload url to release action
  > Add .venv to .gitignore

Updating https://github.com/adafruit/Adafruit_CircuitPython_BluefruitConnect to 1.2.7 from 1.2.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_BluefruitConnect#35 from Neradoc/documentation-for-raw-text-packet
  > Add upload url to release action
  > Add .venv to .gitignore
  > Update .pylintrc for v2.15.5
  > Fix release CI files
  > Update pylint to 2.15.5
  > Updated pylint version to 2.13.0
  > Switching to composite actions

Updating https://github.com/adafruit/Adafruit_CircuitPython_Motor to 3.4.8 from 3.4.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_Motor#70 from makermelissa/master
  > Add upload url to release action

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants