Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   range of joystick input? (http://www.chiefdelphi.com/forums/showthread.php?t=86091)

isaacdl 13-06-2010 21:16

range of joystick input?
 
I'm setting up a throttle control for our bot, using the Z axis (throttle control). The code I'm using to get the value of the Z axis is:

Code:

throttleSpeed = rightStick.getZ() ;
(throttleSpeed is type double.) I need to know what range the value of throttleSpeed could be. Is it -1 to 1, or 0 to 1, or 1 - 255, or something completely different?

JamJam263 13-06-2010 21:31

Re: range of joystick input?
 
Quote:

Originally Posted by isaacdl (Post 966495)
I'm setting up a throttle control for our bot, using the Z axis (throttle control). The code I'm using to get the value of the Z axis is:

Code:

throttleSpeed = rightStick.getZ() ;
(throttleSpeed is type double.) I need to know what range the value of throttleSpeed could be. Is it -1 to 1, or 0 to 1, or 1 - 255, or something completely different?

-1 to 1, where -1 is flat, 0 is half way up, 1 is completely up. We've used throttle control the past two years where
Code:

throttleSpeed = (rightStick.getZ()+1)/2 ;

isaacdl 13-06-2010 21:45

Re: range of joystick input?
 
Perfect, thank you.


All times are GMT -5. The time now is 03:26.

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