Log in

View Full Version : User Button


alopex_rex
12-01-2015, 21:53
Does anyone know if it's possible to read the user button on the RoboRio from WPILib on C++? I've looked around a bit and can't find anything, although apparently it is possible to read it in Labview (and, RobotPy!).

We don't have an actual reason for doing this, our programming team is just fascinated with buttons.

cgmv123
12-01-2015, 21:56
In Java, the method to read it is in the Utility class. I think it's supposed to be the same in C++.

alopex_rex
12-01-2015, 22:05
Found it! The Utility.h file doesn't have any documention, on account of that it doesn't define any data structures. So I had to look in the .h file to see what the function was (GetUserButton(), for the curious).

Thanks! Now I just have to come up with a convincing reason to use it in our program. (Our programming team really likes buttons.)

Joe Ross
13-01-2015, 19:30
Found it! The Utility.h file doesn't have any documention, on account of that it doesn't define any data structures. So I had to look in the .h file to see what the function was (GetUserButton(), for the curious).

The utility file documentation will be included in the next release of wpilib.