View Single Post
  #4   Spotlight this post!  
Unread 24-01-2015, 13:59
TheMechanic40 TheMechanic40 is offline
Registered User
FRC #3506 (YETI Robotics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: North Carolina
Posts: 31
TheMechanic40 is an unknown quantity at this point
Re: Can you get joystick values?

Quote:
Originally Posted by otherguy View Post
In either java or c++, they're both very similar.

Check out the getRawButton method in the joystick class

http://wpilib.screenstepslive.com/s/...1881-joysticks


[edit]
If you're asking how to get the status of all buttons simultaneously, look at the getStickButtons method in the DriverStation class.

Source code is here:
http://team2168.org/javadoc/src-html....html#line.291

Not really sure what the format of the returned in it. I would assume it's that each bit is set corresponding to button id. The code isn't really commented... so you'll need to just try it out and see.
Thank you so much this worked perfectly.