![]() |
POV/Top Switch Programming for Java
So my team is trying to program the top switch for our intake wheels so that:
How do we even call the Top Switch? What method in the Joystick Class would I use??? |
Re: POV/Top Switch Programming for Java
Joystick.getPOV()
|
Re: POV/Top Switch Programming for Java
Forgive me if I make things more confusing, but;
Is the joystick you're using the Logitech 3D one? If it is I believe it is just a hat switch, similar to the xBox controller. I hope this helps some. |
Re: POV/Top Switch Programming for Java
The weird thing about Joystick.getPOV() is that it returns not booleans but an angle, in 45 degree increments. For example, if the user was pressing up on the DPAD, it would return zero. If the bottom and left buttons are being pressed, it would return 135. If no buttons are pressed, it would return -1.
I actually just wrote a class today to handle this, though it might not be useful outside of our larger system. |
| All times are GMT -5. The time now is 20:24. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi