Xbox One trigger changing behavior

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?

Sounds nearly the same as CommandXboxController / leftTrigger() and rightTrigger() not triggering - #50 by StarbuckBarista

Does pressing F1 to refresh the joysticks fix the behavior?

Looks like the same issue as this CommandXboxController / leftTrigger() and rightTrigger() not triggering.

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.

Would you be able to share your procedure? Would appreciate having one in our back pocket prior to our week 1 event

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 should also considerer doing an automated check during your (idle) periodic loop as suggested in the other thread.

We do not use Command based programming, so the code for this button is basically this:

    boolean getArmFastPivotButtonPressed() {
        return (DriverStation.getStickAxis(1, 3) > 0.5) ||
            DriverStation.getStickAxis(1, 2) < -0.5);

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.

It did occur again last night after turning robot off to change battery and then clicking on Rescan. Pressing F1 did indeed fix the problem.

The fix might be in!