Example #1
0
 @Override
 public void buttonUnregistered(int joystickIndex, int buttonIndex) {
   DriverStationPacket.Joystick j = driverStationPacket.getJoystick(joystickIndex);
   if (buttonIndex == j.getButtonCount() - 1) {
     j.setButtonCount(buttonIndex);
   }
 }
Example #2
0
 @Override
 public void buttonRegistered(int joystickIndex, int buttonIndex) {
   DriverStationPacket.Joystick j = getJoystick(joystickIndex);
   if (j.getButtonCount() <= buttonIndex) {
     j.setButtonCount(buttonIndex + 1);
   }
 }