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