View Single Post
  #4   Spotlight this post!  
Unread 16-12-2008, 17:05
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Joystick axis values in new controller

Refer to the C/C++ Programmer Reference Guide.

You can either use Joystick::GetRawAxis(UINT32 axis), where axis is a value between 1 and 6 specifying the axis, or you can simply use Joystick::GetX() and Joystick::GetY(). All of these functions return a floating point value between -1.0f and 1.0f. Returning values between 0 and 255 will lower your precision, as a floating point variable can hold much more data than an unsigned character.
__________________