View Single Post
  #3   Spotlight this post!  
Unread 16-12-2008, 14:47
koreabell koreabell is offline
Team 956 Safety Captain
FRC #0956 (Eagles)
Team Role: Programmer
 
Join Date: Sep 2008
Rookie Year: 2007
Location: Oregon
Posts: 24
koreabell is an unknown quantity at this point
Re: Joystick axis values in new controller

well I'm programming in c++ and there is no examples or something like that on C/C++ Users Guide for joystick axis value(there's nothing except for big "DRAFT" across the page when you go to joystick page)

there is GetRawAxis() function under joystick class which i assume it will return values between 0 to 255, but that is also float type function while GetRaw() function under PWM class is int type(actually UINT8 type) function.

i know float can handle more wide range than int, thus GetRawAxis() might return values between 0 and 255, but still i'm not sure and i won't know until new controller comes

anyway, i wrote a function that will return values between 0 and 255 even if GetY() or GetAxis() function returns values between -1.0 and +1.0