We were greeted with a new problem out of the blue in practice matches today:
Warning at edu.wpi.first.wpilibj.DriverStation.reportJoystickUnpluggedWarning(DriverStation.java:1266): Joystick Button 8 on port 0 not available, check if controller is plugged in
Warning at edu.wpi.first.wpilibj.DriverStation.reportJoystickUnpluggedWarning(DriverStation.java:1266): Joystick Button 4 on port 0 not available, check if controller is plugged in
Just those two buttons… what?? Both seem to activate just fine in Driver Station’s USB screen, but neither sets a WPILib trigger after the robot is enabled.
We temporarily moved them to other buttons and it seems fine. Is this some weird combination of the recent Driver Station update plus a Windows Update that hit Tuesday that I really didn’t think about?
That’s bizarre. This is normally a sign the controller simply isn’t plugged in, as the message suggests.
Did you try restarting the driver station software and/or the machine? I’ve seen weird bugs when the DS is left open for a while, especially after interacting with the FMSField Management System. Restarting the software tends to fix it.
We started rebooting in between matches - no change.
In 3 matches, the Driver Station showed buttons 4 and 8 as operating normally, but WPILib showed the error message above.
For all matches after that, our Technician waited until we were connected to FMS, then disconnected / reconnected the joysticks. Problem avoided… somehow.
At home a few days ago we had a button similarly stop working on a Microsoft Xbox. Tried another Xbox and still didn’t work. Plugged in our Voyee and all is well again. Maybe or maybe not part of a pattern of failure.
What is particularly bizarre about this is that there’s no per-button availability, there’s only a count of buttons (the validity check is only if (button <= count)). So unless buttons 4 and 8 are the only ones being used, the only way this can happen is if the joystick was disconnected (resulting in zero buttons) only for the time buttons 4 and 8 were being read, but connected (resulting in N buttons) for other buttons being read?
It would be interesting to get some data from the robot code about the joystick before and after this happens to see how it compares to the DS joystick tab. Things like:
I think that based on the source, getButtonCount would have to report 3 or less, and then any buttons above that wouldn’t work. What are the button numbers of the ones that work?