Comments (8)
The button classes use the old sysfs devices, which were removed in recent ev3dev test releases.
Buttons are now implemented in the kernel as standard linux input devices. An example how to access these can be found in drive-test.cpp
in the function control::terminate_on_key()
.
from ev3dev-lang.
I don't understand how "/dev/input/by-path/platform-gpio-keys.0-event" works exactly to detect each button. Have you got another explanation or a patch to modify the ev3dev-lang-demo.cpp / ev3dev.cpp?
from ev3dev-lang.
Please take a look at this conversation, where @dlech explains the new approach: https://github.com/mindboards/ev3dev-kernel/issues/24. With this new approach my button classes do not work any longer, I need to change the concept. As soon as we have the next stable kernel release with a stable API, I will fix the button code.
from ev3dev-lang.
Thanks a lot.
Using the C code from @dlech, I modified the button class and I added 3 private properties. I modified also the pressed() function.
So it works !
The command "close(fd);" is not yet implemented , maybe I can add it in the class destructor function...
Where can I send you the update ? by email ? using a new comment ?
from ev3dev-lang.
Simply create a branch in your local git repo, commit your changes and push the branch to GitHub. Then create a pull request on this branch, this enables me to review your changes and add them to my repo.
from ev3dev-lang.
Sorry for the delay. The new code is now on my github and I created the pull request.
https://github.com/cho934/ev3dev-lang
from ev3dev-lang.
No problem with the delay. Thank you for your input.
from ev3dev-lang.
All your requests are done.
Christophe.
2014-08-24 12:06 GMT+02:00 Franz Detro [email protected]:
No problem with the delay. Thank you for your input.
—
Reply to this email directly or view it on GitHub
#2 (comment).
from ev3dev-lang.
Related Issues (20)
- Updating human-readable spec HOT 25
- How to create spec.json HOT 2
- How strictly to follow the language binding specification? HOT 6
- How to implement Button Class HOT 1
- How to use with the autogen system? HOT 26
- Unified language for Java - Library Submission HOT 5
- Having issue to connect Pycharm to the Brick HOT 3
- Standardize "systemDeviceNameConvention"
- Add binding for IR-SEEK to spec HOT 1
- Javascript motor and sensor example HOT 3
- A question about sensor inherits HOT 5
- 0.9.3? HOT 1
- Merge NXT Motor and Large Motor classes
- Some typo on the driver docs HOT 3
- stop lcd going back to menu HOT 2
- Dual motors HOT 2
- UNMET PEER DEPENDENCY bluebird@~3.5.0 HOT 7
- Buttons Error (platform-gpio-keys.0-event not found) HOT 3
- HiTechnic Compass Sensor "Device is not connected" HOT 3
- Status of the project - current ev3dev bindings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ev3dev-lang.