Quote:
Originally Posted by DarthCoder
Hi, we're trying to figure out how to access the joystick name, or some sort of hardware identifier in wpilib from C++. Basically, we want to be able to tell the difference between the logitech joystick, and the Xbox 360 controller when the robot initializes. We plan to convert a joystick into a switch box to store settings for autonomous mode each match, and we don't want to have to check the stick indices every time. Is there any way to get an identifier to tell which stick is shown as which index?
|
I have wanted to do the same thing. It's not using WPIlib but the way I came up with was to have a seperate program running on the driver station that asked Windows what the joysticks were and then sent this to the robot seperately from the control data.
It turned out that it's not hard to write a program on the PC to query the joystick information but we never got around to putting together the pieces to send it to the robot because we ended up only using one joystick.