Page 1 of 1

Joystick Debounce

PostPosted: Fri Oct 21, 2016 3:37 pm
by MauroLuque
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.

Re: Joystick Debounce

PostPosted: Sat Oct 22, 2016 11:15 am
by andrew.kirillov
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.

Re: Joystick Debounce

PostPosted: Tue Oct 25, 2016 7:34 pm
by MauroLuque
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!