Go to the documentation of this file.
30 int m_x_min,m_x_max,m_y_min,m_y_max,
m_z_min,m_z_max;
33 #if defined(MRPT_OS_LINUX)
77 std::vector<bool> &buttons,
80 int *raw_z_pos=NULL );
87 #ifdef MRPT_OS_WINDOWS
88 void setLimits(
int x_min = 0,
int x_max = 0xFFFF,
int y_min=0,
int y_max = 0xFFFF,
int z_min=0,
int z_max = 0xFFFF );
90 void setLimits(
int x_min = -32767,
int x_max = 32767,
int y_min=-32767,
int y_max = 32767,
int z_min=-32767,
int z_max = 32767);
virtual ~CJoystick()
Destructor.
void setLimits(int x_min=-32767, int x_max=32767, int y_min=-32767, int y_max=32767, int z_min=-32767, int z_max=32767)
Set the axis limit values, for computing a [-1,1] position index easily (Only required to calibrate a...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Access to joysticks and gamepads (read buttons and position), and request number of joysticks in the ...
bool getJoystickPosition(int nJoy, float &x, float &y, float &z, std::vector< bool > &buttons, int *raw_x_pos=NULL, int *raw_y_pos=NULL, int *raw_z_pos=NULL)
Gets joystick information.
std::vector< int32_t > vector_int
std::vector< bool > vector_bool
A type for passing a vector of bools.
static int getJoysticksCount()
Returns the number of Joysticks in the computer.
Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020 | | |