code/WPILib/DriverStation.cpp
/**
 * The state of the buttons on the joystick.
 * 12 buttons (4 msb are unused) from the joystick.
 * 
 * @param stick The joystick to read.
 * @return The state of the buttons on the joystick.
 */
The state of the buttons on the joystick.
12 buttons (4 msb are unused) from the joystick.

@param stick The joystick to read.
@return The state of the buttons on the joystick.
The state of the buttons on the joystick . 12 buttons ( 4 msb are unused ) from the joystick . @param stick The joystick to read . @return The state of the buttons on the joystick .
short DriverStation::GetStickButtons(UINT32 stick)
{
	wpi_assert ((stick >= 1) && (stick <= 4));
	switch (stick)
	{
	case 1:
		return m_controlData->stick0Buttons;
	case 2:
		return m_controlData->stick1Buttons;
	case 3:
		return m_controlData->stick2Buttons;
	case 4:
		return m_controlData->stick3Buttons;
	}
	return 0;
}
short DriverStation :: GetStickButtons ( UINT32 stick ) { wpi_assert ( ( stick >= 1 ) && ( stick <= 4 ) ) ; switch ( stick ) { case 1 : return m_controlData -> stick0Buttons ; case 2 : return m_controlData -> stick1Buttons ; case 3 : return m_controlData -> stick2Buttons ; case 4 : return m_controlData -> stick3Buttons ; } return 0 ; }
The state of the buttons on the joystick.
The state of the buttons on the joystick .