Skip to content

Conversation

sgentle
Copy link

@sgentle sgentle commented Mar 8, 2018

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 like USB VID:PID=4d8:fd92 (for some reason my Mac does this). Note that this new pattern won't match strings without VID: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.draw so that it always turns the motors off and lifts the pen, even if interrupted with ctrl+c. Multiple calls to pen_up don't seem to do anything bad, so I figured it was a safe change.

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.

1 participant