View Full Version : Joystick.getRawAxis()
danebouchie
17-02-2014, 18:59
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
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
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
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
Sorry. I was on autopilot and forgot that it was a Java question.
Greg McKaskle
Hi;) ;) :] :D ::rtm::
^^^Reported.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.