Skip to content
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

Convert to Python3. Use PEP8 naming conventions and formatting. #2

Open
wants to merge 1 commit into
base: master
from

Conversation

@ntoll
Copy link
Contributor

@ntoll ntoll commented May 11, 2017

I've been playing with CircuitPython and the Circuit Playground Express. Wanting to flash the device with a new build I ran across this script.

As a courtesy I've converted it from Python 2 (soon to be unsupported) to Python 3 (they tell me it's the future). I've also renamed a few things and changed formatting to conform roughly with the PEP8 Python style guide (https://www.python.org/dev/peps/pep-0008/).

There are no tests! However, I can only confirm the script converts a CircuitPython .bin file to .uf2 and that the device flashed with the resulting firmware.uf2 file works:

$ ./uf2conv.py ~/src/circuitpython/atmel-samd/build-circuitplayground_express/firmware.bin -o firmware.uf2

I've made a cursory check with my eyeball Mk.1 but YMMV with the other functionality. Please check.

Thanks for the tool, the usefulness of uf2 and I hope this is helpful. :-)

@microsoft microsoft deleted a comment from msftclas Sep 27, 2017
@tannewt tannewt requested a review from mmoskal May 14, 2018

def boardID(path):

def board_id(path):

This comment has been minimized.

@khawley

khawley May 14, 2018

Looks like the calls to the function didn't get renamed. (line 120 & line 179)

@mmoskal
Copy link
Member

@mmoskal mmoskal commented May 15, 2018

I think you might have patched an old version, without .hex file support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.