Definition at line 16 of file joystickManager.h.
Public Types | |
| enum | Status { LISTENING = 2, INITIALIZE = 3, CLOSED = 0, ERROR = -2, OPEN = 1 } |
| enumeration for the status of the JoystickManager More... | |
Public Member Functions | |
| int | startJoystickCtrl () |
| calls the thread to begin pulling values from the joystick | |
| int | stopJoystickCtrl () |
| stop pulling values from the joystick | |
| void | setStatus (Status newStatus) |
| set the status of the joystick | |
| void | highStickCheck () |
| starts the thread to check if the joystick is centered properly and sets the status of the joystick | |
| void | setInitWheel (int value) |
| set the value of the joystick wheel | |
| void | convertToSC (int x, int y, int factor) |
| convert joystick inputs to the speed controller commands | |
| void | setXAxis (int x) |
| set the xAxis | |
| void | setYAxis (int y) |
| set the yAxis | |
| void | setMaxSpeed (int spd) |
| set the max speed the robot should go | |
| void | spin (int x, int y, int factor) |
| make the robot spin in place | |
| Status | getStatus () |
| get the status of the Joystick Manager | |
| int | getfd () |
| get the file descriptor for the joystick Manager thread | |
| unsigned char | getAxes () |
| returns how many axis' are on the joystick | |
| unsigned char | getButtons () |
| returns how many buttons are on the joystick | |
| int | getInitWheel () |
| get the value of the initWheel | |
| int | getXAxis () |
| get the current value of the xAxis | |
| int | getYAxis () |
| get the current value of the yAxis | |
| int | getMaxSpeed () |
| read the value that the max speed controller speed is sent to | |
| int | reInit () |
| reInitialize the joystick so it can be reconnected | |
Static Public Member Functions | |
| JoystickManager * | theInstance () |
| returns the singleton instance of the JoystickManager | |
| void | highStickThread () |
| Thread function to check if the joystick is centered. | |
| void | joystickCtrl () |
| thread function to the pull values from the joystick | |
Protected Member Functions | |
| JoystickManager () | |
| Gets the joystick ready to use and checks to make sure it is not off center startJoystickCtrl must be called to acutally use the joystick. | |
| ~JoystickManager () | |
| Destructor for the JoystickManager. | |
Private Attributes | |
| Status | status |
| Status of the JoystickManager. | |
| pthread_t | joystickThread |
| Thread for pulling data from the joystick. | |
| int | jsfd |
| File descriptor for the joystick. | |
| unsigned char | axes |
| number of axes' | |
| unsigned char | buttons |
| number of buttons | |
| int | initWheel |
| value of the initWheel | |
| int | xAxis |
| The current xAxis value. | |
| int | yAxis |
| The current yAxis value. | |
| int | maxSpeed |
| The max speed set by the user 1-127. | |
Static Private Attributes | |
| ScreenManager * | screenManager |
| Reference to the screenManager. | |
| SysLog * | systemLogger |
| Reference to the systemLogger. | |
|
|
enumeration for the status of the JoystickManager
Definition at line 21 of file joystickManager.h. Referenced by getStatus(). |
|
||||||||||||||||
|
convert joystick inputs to the speed controller commands
|
|
|
returns how many axis' are on the joystick
Definition at line 130 of file joystickManager.h. References axes. |
|
|
returns how many buttons are on the joystick
Definition at line 136 of file joystickManager.h. References buttons. |
|
|
get the file descriptor for the joystick Manager thread
Definition at line 124 of file joystickManager.h. References jsfd. |
|
|
get the value of the initWheel
Definition at line 142 of file joystickManager.h. References initWheel. |
|
|
read the value that the max speed controller speed is sent to
Definition at line 160 of file joystickManager.h. References maxSpeed. |
|
|
get the status of the Joystick Manager
Definition at line 118 of file joystickManager.h. |
|
|
get the current value of the xAxis
Definition at line 148 of file joystickManager.h. References xAxis. |
|
|
get the current value of the yAxis
Definition at line 154 of file joystickManager.h. References yAxis. |
|
|
reInitialize the joystick so it can be reconnected
|
|
|
set the value of the joystick wheel
|
|
|
set the max speed the robot should go
|
|
|
set the status of the joystick
|
|
|
set the xAxis
|
|
|
set the yAxis
|
|
||||||||||||||||
|
make the robot spin in place
|
|
|
calls the thread to begin pulling values from the joystick
|
|
|
stop pulling values from the joystick
|
|
|
returns the singleton instance of the JoystickManager
|
1.3.6