We are using “Xbox One for Windows” joysticks for the first year.
The left trigger on this joystick causes Axis 2 to go from 0 to 1. Normally the right trigger on this joystick causes Axis 3 to go from 0 to 1. However, it has happened to us twice now in the middle of the day where the behavior has changed so the right trigger causes Axis 2 to go from 0 to -1 instead. The first time, we just changed our code, until we had to change it back again. The second time, we tried unplugging the joystick and plugging it back in again, and that fixed the problem.
We can demonstrate this behavior right from the Driver Station joystick tab, so it is not a programming issue. Bug in the driver station? Bug in the joystick drivers?
We currently have changed our code to detect either scenario, so hopefully we will not get burned at competition by this. Has anyone else seen this issue?
Edit: Peter got it while I was looking. FYI we are experiencing the same issue and have implemented a procedure to rescan the usb inputs in DS twice before we enable the robot.
I will try tonight to reproduce and see if F1 fixes the problem. Based on the notes in the other thread, it would seem we are seeing the exact same issue, and it is likely a bug in the NI Driver Station software.
It is just an entry in our prematch checklist for the operator to click the rescan button in Driver Station twice. As far as I know there is no way to automate this process.
You could nonetheless call DriverStation.getJoystickIsXbox(1) in your method and log an error to the console if it returns false to make the drive team aware that they need to remedy the situation.