Skip to content

Micropython buttons support#639

Merged
dwalton76 merged 11 commits intoev3dev:ev3dev-stretchfrom
dwalton76:micropython-buttons
May 30, 2019
Merged

Micropython buttons support#639
dwalton76 merged 11 commits intoev3dev:ev3dev-stretchfrom
dwalton76:micropython-buttons

Conversation

@dwalton76
Copy link
Copy Markdown
Collaborator

For issue #571

@dwalton76
Copy link
Copy Markdown
Collaborator Author

Huge credit with this patch goes to David's work at https://github.com/dlech/micropython-ev3dev/blob/ev3dev-stetch/src/uev3dev/button.py

@dwalton76
Copy link
Copy Markdown
Collaborator Author

Not sure why the test cases are failing for micropython, they pass when I run them locally via micropython tests/api_tests.py. Will dig some more later...

Copy link
Copy Markdown
Member

@WasabiFan WasabiFan left a comment

Choose a reason for hiding this comment

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

Nice! To make sure the API didn't change I diffed the docs output and aside from some reordering and wording changes it looks like the API surface is the same.

So once you figure out what happened to the CI build (maybe an independent package published an update that broke us?) I think this looks OK. Just make sure the general stuff has been tested on both platforms. 👍

Thanks!

@dwalton76
Copy link
Copy Markdown
Collaborator Author

For some reason the dst directory isn't getting cleaned up after the first test runs (I have no clue as to why yet) so all of the others fail at shutil.copytree(src, dst) because the dst directory is already there. I submitted a PR here:
ev3dev/ev3dev-lang-fake-sys#14

to delete the dst directory if it is already there.

@dwalton76
Copy link
Copy Markdown
Collaborator Author

Long story short shutil.rmtree is broken in micropython v1.9.4 and that is why the directory isn't cleaned up. Possible work-around in ev3dev/ev3dev-lang-fake-sys#15

@dwalton76
Copy link
Copy Markdown
Collaborator Author

woohoo finally a clean test run!! :)

@dwalton76 dwalton76 merged commit 830a6ff into ev3dev:ev3dev-stretch May 30, 2019
@dwalton76 dwalton76 deleted the micropython-buttons branch May 30, 2019 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants