mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Check if Joystick Button exists when requested and pass 0 and warn if it doesn't
Change-Id: I2194859ef8b263f1a20aba52ec154fb0a1fc8078
This commit is contained in:
@@ -228,7 +228,7 @@ bool Joystick::GetBumper(JoystickHand hand)
|
||||
**/
|
||||
bool Joystick::GetRawButton(uint32_t button)
|
||||
{
|
||||
return ((0x1 << (button-1)) & m_ds->GetStickButtons(m_port)) != 0;
|
||||
return m_ds->GetStickButton(m_port, button);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user