Better port finding, Python 3 fixes, and util.draw cleanup#7
Open
sgentle wants to merge 3 commits intofogleman:masterfrom
Open
Better port finding, Python 3 fixes, and util.draw cleanup#7sgentle wants to merge 3 commits intofogleman:masterfrom
sgentle wants to merge 3 commits intofogleman:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! I've fixed a couple things in my fork that you might like.
I made the port finding use pyserial 3's
.pid/.vid, and fall back to more robust string parsing for pyserial 2 that should match obscure cases likeUSB VID:PID=4d8:fd92(for some reason my Mac does this). Note that this new pattern won't match strings withoutVID:PID=, but I think pyserial always provides that.I also fixed an error I was getting because pyserial 3 expects strings to be encoded into bytes before writing them. With both of those fixes it's working well under python 2 and 3 on my Mac.
Lastly, I put a try/finally in
util.drawso that it always turns the motors off and lifts the pen, even if interrupted with ctrl+c. Multiple calls topen_updon't seem to do anything bad, so I figured it was a safe change.