10 std::cout <<
"numJoystick:" << numJoystick << std::endl;
11 if (
m_fd >= numJoystick) {
17 int j, nbuttons=0, naxes=0;
19 if(m_dev[
m_fd].axis[j].exist!=0){
24 if(m_dev[
m_fd].button[j].exist!=0){
28 std::cout <<
"axes:" << naxes <<
", buttons:" << nbuttons << std::endl;
42 if(m_dev[
m_fd].axis[j].exist!=0){
43 m_axes[j] = m_dev[
m_fd].axis[j].GetCalibratedValue();
47 if(m_dev[
m_fd].button[j].exist!=0){
int YsJoyReaderLoadJoystickCalibrationInfo(int nJoystick, YsJoyReader joystick[])
std::vector< bool > m_buttons
const int YsJoyReaderMaxNumAxis
const int YsJoyReaderMaxNumButton
joystick(const char *dev)
def j(str, encoding="cp932")
int YsJoyReaderSetUpJoystick(int &nJoystick, YsJoyReader joystick[], int maxNumJoystick)
std::vector< float > m_axes