53 typedef std::vector<SDLJoypadImpl::stick> stickVector;
56 std::vector<SDL_Joystick*> m_device;
57 unsigned int m_buttonCount {0};
58 unsigned int m_axisCount {0};
59 unsigned int m_stickCount {0};
60 unsigned int m_touchCount {0};
61 unsigned int m_ballCount {0};
62 unsigned int m_hatCount {0};
65 std::vector<bool> m_axes;
66 double m_actionTimestamp;
71 bool getPureAxis(
unsigned int axis_id,
double& value);
78 bool close()
override;
93 bool getRawStickDoF(
unsigned int stick_id,
unsigned int& DoF)
override;
95 bool getRawButton(
unsigned int button_id,
float& value)
override;
99 bool getRawHat(
unsigned int hat_id,
unsigned char& value)
override;
101 bool getRawAxis(
unsigned int axis_id,
double& value)
override;
SDLJoypad: Device that reads inputs of Joypads compatible with the SDL library.
bool getRawAxisCount(unsigned int &axis_count) override
bool getRawButtonCount(unsigned int &button_count) override
bool getRawTouchSurfaceCount(unsigned int &touch_count) override
bool getRawStickDoF(unsigned int stick_id, unsigned int &DoF) override
bool getRawHat(unsigned int hat_id, unsigned char &value) override
bool getRawTrackballCount(unsigned int &trackball_count) override
bool close() override
Close the DeviceDriver.
bool getRawButton(unsigned int button_id, float &value) override
bool getRawAxis(unsigned int axis_id, double &value) override
bool getRawStickCount(unsigned int &stick_count) override
bool getRawHatCount(unsigned int &hat_count) override
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool getRawStick(unsigned int stick_id, yarp::sig::Vector &value, JoypadCtrl_coordinateMode coordinate_mode) override
bool getRawTrackball(unsigned int trackball_id, yarp::sig::Vector &value) override
bool getRawTouch(unsigned int touch_id, yarp::sig::Vector &value) override
Interface implemented by all device drivers.
JoypadCtrl_coordinateMode
A base class for nested structures that can be searched.
std::vector< unsigned int > axes_ids
std::vector< int > direction