View Single Post
  #6   Spotlight this post!  
Unread 19-02-2014, 09:54
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Data Range on Joystick.getRawAxis

Quote:
Originally Posted by gluxon View Post
Interesting. I wonder if positive joystick values are expanded (more sensitive) than negative ones looking at this code.
Not really.

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.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack