Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Joystick.getRawAxis() (http://www.chiefdelphi.com/forums/showthread.php?t=126688)

danebouchie 17-02-2014 18:59

Joystick.getRawAxis()
 
What is the range of the .getRawAxis() method on the joystick? is it 0-360 (degrees), 0 - 2pi (radians) or -1 to 1? Couldn't find it in sunspot doc.

MathMaven 17-02-2014 19:08

Re: Joystick.getRawAxis()
 
Joystick::GetRawAxis() will return a value between -1 and 1, with 0 as neutral. Positive usually corresponds to up if in the y-direction and right if in the x-direction.

Greg McKaskle 17-02-2014 21:13

Re: Joystick.getRawAxis()
 
Actually, the returned data is an I8. It goes from -128 to 127. The normal joystick functions are scaled, but not the raw one.

Greg McKaskle

Joe Ross 17-02-2014 21:17

Re: Joystick.getRawAxis()
 
Quote:

Originally Posted by Greg McKaskle (Post 1344899)
Actually, the returned data is an I8. It goes from -128 to 127. The normal joystick functions are scaled, but not the raw one.

In Java, getRawAxis gets the scale value of an axis based on joystick axis number, rather then the joystick axis enum. Java does not provide an interface to the unscaled value like LabVIEW does.

Greg McKaskle 17-02-2014 21:27

Re: Joystick.getRawAxis()
 
Sorry. I was on autopilot and forgot that it was a Java question.

Greg McKaskle

Whippet 17-02-2014 21:39

Re: Joystick.getRawAxis()
 
Quote:

Originally Posted by RGF (Post 1344918)
Hi;) ;) :] :D ::rtm::

^^^Reported.


All times are GMT -5. The time now is 02:35.

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