Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
nps_radio_control_joystick.h File Reference
This graph shows which files directly or indirectly include this file:

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.
void nps_radio_control_joystick_update (void)
 Updates joystick buttons from events, directly reads current axis positions.

Variables

struct NpsJoystick nps_joystick

Data Structure Documentation

◆ NpsJoystick

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

Function Documentation

◆ nps_radio_control_joystick_init()

int nps_radio_control_joystick_init ( const char * device)
extern

Initializes SDL and the joystick.

Function exits with -1 if fails

Parameters
devicestring integer of desired joystick device
Returns
0 on success

Definition at line 130 of file nps_radio_control_joystick.c.

References JS_NB_AXIS, JS_NB_BUTTONS, MODE_SWITCH_AUTO2, nps_joystick, and sdl_joystick.

Referenced by nps_radio_control_init().

Here is the caller graph for this function:

◆ nps_radio_control_joystick_update()

void nps_radio_control_joystick_update ( void )
extern

Updates joystick buttons from events, directly reads current axis positions.

Definition at line 201 of file nps_radio_control_joystick.c.

References 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, sdl_event, and sdl_joystick.

Referenced by nps_radio_control_available().

Here is the caller graph for this function:

Variable Documentation

◆ nps_joystick