Check if Joystick Button exists when requested and pass 0 and warn if it doesn't

Change-Id: I2194859ef8b263f1a20aba52ec154fb0a1fc8078
This commit is contained in:
Kevin O'Connor
2014-11-21 11:32:08 -05:00
parent 14a1e6ae8e
commit 7e5ed03d28
9 changed files with 41 additions and 26 deletions

View File

@@ -201,9 +201,9 @@ int HALGetJoystickPOVs(uint8_t joystickNum, HALJoystickPOVs *povs)
return FRC_NetworkCommunication_getJoystickPOVs(joystickNum, (JoystickPOV_t*) povs, kMaxJoystickPOVs);
}
int HALGetJoystickButtons(uint8_t joystickNum, HALJoystickButtons *buttons, uint8_t *count)
int HALGetJoystickButtons(uint8_t joystickNum, HALJoystickButtons *buttons)
{
return FRC_NetworkCommunication_getJoystickButtons(joystickNum, buttons, count);
return FRC_NetworkCommunication_getJoystickButtons(joystickNum, &buttons->buttons, &buttons->count);
}
int HALGetMatchTime(float *matchTime)