![]() |
Joysticks
We are having issues with our code on programming the joysticks. When we press the button our solenoids switch but sometimes they will switch right back. The Dashboard shows that they switch and then switch back sometimes. So I know they are opening. Any suggestions. Here is the code we are using
Code:
if(js2.getRawButton(3) == true && j2b3 == false){ |
Re: Joysticks
should it be j2b2 in the primary if statement as opposed to j2b3? not sure if that was a typo in posting, if so, then I might need a little bit more detail to help you.
|
Re: Joysticks
Quote:
Quote:
|
Re: Joysticks
Quote:
|
Re: Joysticks
Quote:
|
Re: Joysticks
One thing you can try is editing your else to an else if:
Code:
... |
Re: Joysticks
The easiest way to implement debounce is to have a counter where you have to read an input for a certain number of times for it to be considered valid.
|
| All times are GMT -5. The time now is 22:19. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi