SDLJoypad
: Device that reads inputs of Joypads compatible with the SDL library.
More...
#include <SDLJoypad/SDLJoypad.h>
Additional Inherited Members | |
![]() | |
enum | JoypadCtrl_coordinateMode |
![]() | |
enum | JoypadCtrl_coordinateMode { JypCtrlcoord_POLAR = 0 , JypCtrlcoord_CARTESIAN = 1 } |
![]() | |
virtual bool | executeAction (int action_id) |
virtual bool | parseActions (const yarp::os::Searchable &cfg, int *count=nullptr) |
![]() | |
std::map< int, std::string > | m_actions |
![]() | |
std::map< int, std::string > | m_actions |
SDLJoypad
: Device that reads inputs of Joypads compatible with the SDL library.
Parameters accepted in the config argument of the open method:
Parameter name | Type | Units | Default Value | Required | Description | Notes |
---|---|---|---|---|---|---|
UseAllJoypadAsOne | string | if there are more than one joypad connected | merge together multiple joypad | set it to 1 to have all the connected joypad as one | ||
DefaultJoystickNumber | string | will be asked | No | select the id of the joypad to use | important if there are more than one joypad and UseAllJoypadAsOne is set to 0. if not present, a input will be requested to the user | |
sticks | int | Yes | count of sticks to configure | for each stick there must be a group called STICK<id here> with data on the axis to be configured as stickl | ||
STICK[ID] | group | depending on 'sticks' parameter | group containing axes data for this stick | |||
axes | int | yes | axes count for this stick | set it for each stick in the proper stick group | ||
axis[ID]_id | int | depending on axes parameter | axis id for current stick related axis | set it for each stick in the proper stick group | ||
invert_axis_[ID] | bool | false | no | invert the current axis | set it for each stick in the proper stick group | |
deadZone | double | 0.0 | yes | set the deadzone for this stick | set it for each stick in the proper stick group |
Definition at line 48 of file SDLJoypad.h.
|
default |
|
virtualdefault |
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 248 of file SDLJoypad.cpp.
Implements yarp::dev::IJoypadEventDriven.
Definition at line 349 of file SDLJoypad.cpp.
Implements yarp::dev::IJoypadEventDriven.
Definition at line 253 of file SDLJoypad.cpp.
Implements yarp::dev::IJoypadEventDriven.
Definition at line 300 of file SDLJoypad.cpp.
Implements yarp::dev::IJoypadEventDriven.
Definition at line 259 of file SDLJoypad.cpp.
Implements yarp::dev::IJoypadEventDriven.
Definition at line 396 of file SDLJoypad.cpp.
Implements yarp::dev::IJoypadEventDriven.
Definition at line 271 of file SDLJoypad.cpp.
|
overridevirtual |
Implements yarp::dev::IJoypadEventDriven.
Definition at line 365 of file SDLJoypad.cpp.
Implements yarp::dev::IJoypadEventDriven.
Definition at line 283 of file SDLJoypad.cpp.
Implements yarp::dev::IJoypadEventDriven.
Definition at line 289 of file SDLJoypad.cpp.
|
overridevirtual |
Implements yarp::dev::IJoypadEventDriven.
Definition at line 391 of file SDLJoypad.cpp.
Implements yarp::dev::IJoypadEventDriven.
Definition at line 277 of file SDLJoypad.cpp.
|
overridevirtual |
Implements yarp::dev::IJoypadEventDriven.
Definition at line 418 of file SDLJoypad.cpp.
Implements yarp::dev::IJoypadEventDriven.
Definition at line 265 of file SDLJoypad.cpp.
|
overridevirtual |
Open the DeviceDriver.
config | is a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device). |
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 30 of file SDLJoypad.cpp.