Skip to content

adjust sample length if needed for max sample rate #41

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 1 commit into from
Oct 3, 2018

Conversation

caternuson
Copy link
Contributor

Adds check to go along with fix added for #40.

BEFORE

Adafruit CircuitPython 3.0.2-2-gaf7a0ee on 2018-09-19; Adafruit CircuitPlayground Express with samd21g18
>>> from adafruit_circuitplayground.express import cpx
>>> cpx.play_tone(330, 1)
>>> cpx.play_tone(660, 1)
>>> cpx.play_tone(3200, 1)
>>> cpx.play_tone(4200, 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_circuitplayground/express.py", line 594, in play_tone
  File "adafruit_circuitplayground/express.py", line 625, in start_tone
ValueError: Sample rate too high. It must be less than 350000
>>>

AFTER

Adafruit CircuitPython 3.0.2-2-gaf7a0ee on 2018-09-19; Adafruit CircuitPlayground Express with samd21g18
>>> from adafruit_circuitplayground.express import cpx
>>> cpx.play_tone(330, 1)
>>> cpx.play_tone(660, 1)
>>> cpx.play_tone(3200, 1)
>>> cpx.play_tone(4200, 1)
>>> 

@caternuson caternuson requested review from tannewt and kattni October 2, 2018 21:45
Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

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

Thanks for getting this fixed up!

@kattni kattni merged commit 36ec7b3 into adafruit:master Oct 3, 2018
@caternuson caternuson mentioned this pull request Oct 3, 2018
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 3, 2018
Updating https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground to 2.0.3 from 2.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#41 from caternuson/iss40
  > ignore the board module imports in .pylintrc
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#38 from kattni/pylint-fix
  > updated CoC

Updating https://github.com/adafruit/Adafruit_CircuitPython_HCSR04 to 0.3.3 from 0.3.2:
  > Try a new encrypted password

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIDARLite to 1.1.0 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIDARLite#2 from kattni/pypi-setup

Updating https://github.com/adafruit/Adafruit_CircuitPython_MLX90614 to 1.1.0 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MLX90614#9 from kattni/pypi-setup
  > ignore the board module imports in .pylintrc
  > updated CoC

Updating https://github.com/adafruit/Adafruit_CircuitPython_TCA9548A to 0.1.1 from 0.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_TCA9548A#3 from kattni/pypi-setup

Updating https://github.com/adafruit/Adafruit_CircuitPython_miniQR to 1.1.0 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_miniQR#3 from kattni/pypi-setup

Updating https://github.com/adafruit/Adafruit_CircuitPython_SimpleIO to 1.1.1 from 1.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#36 from caternuson/iss35
  > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#34 from brentru/remove-servo
  > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#32 from ScottDWebster/master
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.

2 participants