mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Added C++ versions of the joystick query functions
Change-Id: I4acdb0a54493e633b2a7a9b265c3958a9ba163d1
This commit is contained in:
@@ -262,6 +262,37 @@ bool Joystick::GetButton(ButtonType button)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of axis for a joystick
|
||||
*
|
||||
* @return the number of axis for the current joystick
|
||||
*/
|
||||
int Joystick::GetAxisCount()
|
||||
{
|
||||
return m_ds->GetStickAxisCount(m_port);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of axis for a joystick
|
||||
*
|
||||
* @return the number of buttons on the current joystick
|
||||
*/
|
||||
int Joystick::GetButtonCount()
|
||||
{
|
||||
return m_ds->GetStickButtonCount(m_port);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of axis for a joystick
|
||||
*
|
||||
* @return then umber of POVs for the current joystick
|
||||
*/
|
||||
int Joystick::GetPOVCount()
|
||||
{
|
||||
return m_ds->GetStickPOVCount(m_port);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the channel currently associated with the specified axis.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user