Today I was working on the chassis code, when I found a persistent issue while using
XboxController.getRightX. These values were being registered even when nothing was pressed. After some thorough debugging, I found that the axis ports used for these was used wrongly and changed with those of the bumpers. Here are photos that further explain this:
For the last picture, I was not pressing any buttons or joysticks. As you can see, the Axis ports 4 & 5 are registered for the left and right bumpers, but inside of WPILIB, these ports are used for
Axis’ and buttons are both ids 0-x so while there may be both an I’d of 0 in each, they don’t overlap as one is an axis and another is a button.
Okay, then why is it that the getRightY and getRightX functions are binded to the control’s bumpers rather than the joysticks?
Does it work when using the Driver Station instead of the SimGui? Have you selected the map gamepad option in the SimGui?
The simulation GUI joysticks don’t always give the same results as the DS. You can run with the DS reading the joysticks by ticking the “sim DriverStation” box when starting simulation and running the real DS at the same time as sim.
Yeah, you’re right. We tried with the DS and the GUI and there is some errors between them.