Code Monkey home page Code Monkey logo

Comments (8)

fdetro avatar fdetro commented on July 30, 2024

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.

cho934 avatar cho934 commented on July 30, 2024

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.

fdetro avatar fdetro commented on July 30, 2024

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.

cho934 avatar cho934 commented on July 30, 2024

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.

fdetro avatar fdetro commented on July 30, 2024

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.

cho934 avatar cho934 commented on July 30, 2024

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.

fdetro avatar fdetro commented on July 30, 2024

No problem with the delay. Thank you for your input.

from ev3dev-lang.

cho934 avatar cho934 commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.