Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the source code of this file.
Data Structures | |
struct | NpsJoystick |
Functions | |
int | nps_radio_control_joystick_init (const char *device) |
Initializes SDL and the joystick. More... | |
void | nps_radio_control_joystick_update (void) |
Updates joystick buttons from events, directly reads current axis positions. More... | |
Variables | |
struct NpsJoystick | nps_joystick |
struct NpsJoystick |
Definition at line 29 of file nps_radio_control_joystick.h.
Data Fields | ||
---|---|---|
double | mode | |
double | pitch | |
double | roll | |
double | throttle | |
double | yaw |
int nps_radio_control_joystick_init | ( | const char * | device | ) |
Initializes SDL and the joystick.
Function exits with -1 if fails
device | string integer of desired joystick device |
Definition at line 130 of file nps_radio_control_joystick.c.
References JS_NB_AXIS, JS_NB_BUTTONS, NpsJoystick::mode, MODE_SWITCH_AUTO2, nps_joystick, NpsJoystick::pitch, NpsJoystick::roll, sdl_joystick, NpsJoystick::throttle, and NpsJoystick::yaw.
Referenced by nps_radio_control_init().
void nps_radio_control_joystick_update | ( | void | ) |
Updates joystick buttons from events, directly reads current axis positions.
Definition at line 201 of file nps_radio_control_joystick.c.
References NpsJoystick::mode, MODE_SWITCH_AUTO1, MODE_SWITCH_AUTO2, MODE_SWITCH_MANUAL, nps_joystick, NPS_JS_AXIS_PITCH, NPS_JS_AXIS_ROLL, NPS_JS_AXIS_THROTTLE, NPS_JS_AXIS_YAW, NPS_JS_BUTTON_MODE_AUTO1, NPS_JS_BUTTON_MODE_AUTO2, NPS_JS_BUTTON_MODE_MANUAL, NpsJoystick::pitch, NpsJoystick::roll, sdl_event, sdl_joystick, NpsJoystick::throttle, and NpsJoystick::yaw.
Referenced by nps_radio_control_available().
struct NpsJoystick nps_joystick |
Definition at line 117 of file nps_radio_control_joystick.c.
Referenced by nps_radio_control_available(), nps_radio_control_joystick_init(), and nps_radio_control_joystick_update().