Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Programming Help (http://www.chiefdelphi.com/forums/showthread.php?t=112784)

M15onebillion 05-02-2013 00:16

Programming Help
 
Hi I'm new at java in a rookie team and wanted to ask a few questions. So lately I wanted to program the throttle axis of the Logitech Attack joystick to yield a different motor speed corresponding to the axis position, but I don't know how to assign the axis(or any button at all) without the use of an "if" statement. Could anyone show me how to do it, perhaps give a little example.

I appreciate your help!

nimda 05-02-2013 15:33

Re: Programming Help
 
You can use Joystick.getRawAxis(int axis). It returns a double between -1 and 1 that can be passed directly to Jaguar.set(double value).

Post back if you need more help.


All times are GMT -5. The time now is 09:52.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi