EV3-G API for Button#386
EV3-G API for Button#386dwalton76 merged 10 commits intoev3dev:developfrom dwalton76:ev3g-api-buttons2
Conversation
|
For issue #354 |
|
Might I suggest using python-evdev to simplify things a bit here? |
|
That looks handy for Buttons but what about Sensors? I could just have any |
|
For sensors, the only thing you can do for now is busy wait as you suggested. |
| Priority: optional | ||
| Standards-Version: 3.9.5 | ||
| Build-Depends: python3-setuptools (>= 0.6b3), python3-all (>= 3.4), debhelper (>= 9), dh-python | ||
| Build-Depends: python3-setuptools (>= 0.6b3), python3-all (>= 3.4), debhelper (>= 9), dh-python, python-evdev |
There was a problem hiding this comment.
This is build deps. You don't need to add anything here.
Debian automatically figures out python package dependencies, so you don't need to add it in the binary package either.
(And this is the python2 version of the package)
| yield f | ||
|
|
||
|
|
||
| def file_open(path): |
There was a problem hiding this comment.
Actually, I can undo this change, it is no longer needed.
This reverts commit 2985e93.
|
How do I update the CI test to install python-evdev? |
|
Or you can change (probably needs |
| python: | ||
| - 3.4 | ||
| sudo: false | ||
| sudo: true |
There was a problem hiding this comment.
I'd prefer not to do this... a) we already use pip for the other dependency and b) this switches the builds from container-based to full VMs which they claim are slower.
|
It looks like it is installing but fails to import in api_tests.py....will dig more tomorrow |
|
Sorry for being late to the train, but is there |
|
I can't find where there is micropython support for python-evdev. For micropython we could always drop into a loop instead of being event driven...not great but would be a work-around. |
|
No, micropython does not support anything that is not in the standard library and only a fraction of the standard library. We can easily implement something very similar to the parts of evdev that we need in micropython, but not in a way that is compatible with regular python (e.g. you need to use uctypes which is not api compatible with ctypes). |
|
I need to get this in to finish the work on #388 and I think this one is in pretty good shape (no comments recently) so I am going to go ahead and merge it. |
No description provided.