-
Notifications
You must be signed in to change notification settings - Fork 12
a little refactoring, speed-up, and CPython compatibility #5
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
Conversation
…ead_picture_into (yay faster), CPython compatible with example removed: initialization args have been change, only pass in a uart now!
passing travis & ready for review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple small things. Good overall. Thanks!
adafruit_vc0706.py
Outdated
for _ in range(2): # 2 retries to reset then check resetted baudrate | ||
for baud in (9600, 19200, 38400, 57600, 115200): | ||
self._uart.baudrate = baud | ||
if self._run_command(_RESET, bytes([0x00]), 5): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of bytes([0x00])
do b'\x00'
. That way it doesn't need to create a list to convert to bytes.
adafruit_vc0706.py
Outdated
:param ~microcontroller.Pin tx: Transmit pin | ||
:param int baudrate: Serial connection speed | ||
:param int timeout: Read timeout in seconds | ||
:param int buffer_size: Receive buffer size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest updating this, not just deleting it. It makes for nicely formatted docs: https://circuitpython.readthedocs.io/projects/vc0706/en/latest/api.html#adafruit_vc0706.VC0706
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Updating https://github.com/adafruit/Adafruit_CircuitPython_MPR121 to 1.1.1 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_MPR121#8 from ladyada/master Updating https://github.com/adafruit/Adafruit_CircuitPython_VC0706 to 4.0.0 from 3.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_VC0706#5 from ladyada/master
added: auto-detect baudrate, allow baudrate change, no flush during read_picture_into (yay faster), CPython compatible with example
removed: initialization args have been change, only pass in a uart now!
tested on feather m4 w/wing and internal FS
API changed so we'll need a large version bump. but it was terribly slow before