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