Extended Joystick Functionality

We have some joysticks that we would like to use next year but the controller uses more than 6 axis and 12 buttons (its really 2 controllers interfaced to 1 usb). I found a way to use all these buttons using labview’s native joystick input functions. Is there any reason that shouldn’t read these values on the driverstation and then send them via the permitted UDP port to the robot?


I’m not aware of whether or not WPILib can deal with those axis and button counts, but I believe that you are correct in believing that FIRST’s protocol doesn’t transmit that extra data.

Reading the values on the dashboard and sending them over via UDP sounds like a fine solution. Off the top of my head, I can think of two possible issues:

  1. Two programs accessing 1 joystick might be a problem (I don’t think it’ll be an issue, but maybe… all I can suggest is to try).

  2. Delay in transmissions. I’ve done custom (not for FIRST robots, though) communication between a DS and a mobile robot, and if the packets get delayed or queued up, it’s possible for a large delay in control response to form. I suggest taking 2 precautions: code a watchdog for your UDP transmissions (in case of loss of your custom UDP communications without a corresponding loss in “main” communications), and timestamp the packets.

By timestamping, I mean that it should have a way to detect if the packet is too “old.” I’m not sure if the dashboard protocol includes match time, but if so, that could be used.

Alternatively, the robot could transmit time (in milliseconds since boot) to the dashboard, which timestamps the packets it sends back to the robot (this would be more work, but might be more reliable (not having to deal with teleop/autonomous/disabled modes)).

I hope this helps, and good luck (I’ve seen teams using the Saitek X52 system, which sounds like what you’re referring to. I’m not sure if they used buttons and axes not transmitted by WPILib, though).

Since two programs will be trying to open the joysticks, that may cause issues. Of course if you run the dashboard on a second laptop, that would get around that issue.

Greg McKaskle