![]() |
Data Range on Joystick.getRawAxis
I couldn't find what the range goes to. Is it mesaured in angles (0-360), radians (0-2pi) or -1 to 1? (Java)
|
Re: Data Range on Joystick.getRawAxis
getRawAxis() returns a double in the range -1.0 to 1.0. As a default (joystick centered) the method returns 0.0.
For more information look at the WPILib API courtesy of 2168. |
Re: Data Range on Joystick.getRawAxis
Quote:
|
Re: Data Range on Joystick.getRawAxis
Quote:
Code:
public double getRawAxis(final int axis) {Code:
private DriverStation m_ds;Code:
public double getStickAxis(int stick, int axis) { |
Re: Data Range on Joystick.getRawAxis
Quote:
|
Re: Data Range on Joystick.getRawAxis
Quote:
The JS is sent as a signed int (two's compliment) in the UDP packet. A signed int has a range of -128 to +127. This is because there is no 'negative zero', so there is 1 'extra' count on the negative side since zero is considered a positive number. |
| All times are GMT -5. The time now is 02:34. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi