AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Joystick Debounce

The forum is to discuss topics related to robotics, like building robot, controlling it, its software and hardware, etc.

Joystick Debounce

Postby MauroLuque » Fri Oct 21, 2016 3:37 pm

Hello, I´m pretty new in this forum and i´m developing a c# program. I´m using Aforge.net for the joystick controls. It runs very well but I have a minor problem with this. When I press a button this triggers several times because i have not found a way to make a debounce on it. Is there some kind of method or any feature to implement a software debounce on the joystick buttons on this library (Aforge.Controls)? Thank you so much.
MauroLuque
 
Posts: 2
Joined: Fri Oct 21, 2016 3:21 pm

Re: Joystick Debounce

Postby andrew.kirillov » Sat Oct 22, 2016 11:15 am

Hello,

The current class provided in the framework does not trigger anything. There are no events, callbacks, etc. It just provides current state of buttons. You will need to put some code in your application to achieve your goal.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3172
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: Joystick Debounce

Postby MauroLuque » Tue Oct 25, 2016 7:34 pm

Thank you Andrew! I really appreciate your answer. I suspected that it was the case as I readed some examples on the web. What i did is to use a timer and test the status of the buttons within each tick so I can program a routine for this "events".
Best regards from Argentina!
MauroLuque
 
Posts: 2
Joined: Fri Oct 21, 2016 3:21 pm




Return to Robotics