Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
nps_radio_control.c File Reference
#include "nps_radio_control.h"
#include "nps_radio_control_spektrum.h"
#include "nps_radio_control_joystick.h"
#include <stdio.h>
Include dependency graph for nps_radio_control.c:

Go to the source code of this file.

Macros

#define RADIO_CONTROL_DT   (1./40.)
#define RADIO_CONTROL_TAKEOFF_TIME   8

Typedefs

typedef void(* rc_script) (double)

Functions

void nps_radio_control_init (enum NpsRadioControlType type, int num_script, char *js_dev)
static void radio_control_script_takeoff (double time)
static void radio_control_script_hover (double time)
static void radio_control_script_step_roll (double time)
static void radio_control_script_step_pitch (double time)
static void radio_control_script_step_yaw (double time)
static void radio_control_script_ff (double time)
bool nps_radio_control_available (double time)

Variables

struct NpsRadioControl nps_radio_control
static rc_script scripts []

Macro Definition Documentation

◆ RADIO_CONTROL_DT

#define RADIO_CONTROL_DT   (1./40.)

Definition at line 29 of file nps_radio_control.c.

Referenced by nps_radio_control_available().

◆ RADIO_CONTROL_TAKEOFF_TIME

#define RADIO_CONTROL_TAKEOFF_TIME   8

Definition at line 78 of file nps_radio_control.c.

Referenced by nps_radio_control_available(), and radio_control_script_ff().

Typedef Documentation

◆ rc_script

typedef void(* rc_script) (double)

Definition at line 60 of file nps_radio_control.c.

Function Documentation

◆ nps_radio_control_available()

bool nps_radio_control_available ( double time)

Definition at line 81 of file nps_radio_control.c.

References FALSE, JOYSTICK, NORC, nps_joystick, nps_radio_control, nps_radio_control_joystick_update(), RADIO_CONTROL_DT, radio_control_script_takeoff(), RADIO_CONTROL_TAKEOFF_TIME, SCRIPT, scripts, and TRUE.

Referenced by nps_autopilot_run_step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nps_radio_control_init()

void nps_radio_control_init ( enum NpsRadioControlType type,
int num_script,
char * js_dev )

Definition at line 35 of file nps_radio_control.c.

References JOYSTICK, NpsRadioControl::js_dev, NORC, nps_radio_control, nps_radio_control_joystick_init(), nps_radio_control_spektrum_init(), NpsRadioControl::num_script, SCRIPT, SPEKTRUM, and NpsRadioControl::type.

Referenced by nps_autopilot_init(), and nps_autopilot_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ radio_control_script_ff()

void radio_control_script_ff ( double time)
static

◆ radio_control_script_hover()

void radio_control_script_hover ( double time)
static

Definition at line 131 of file nps_radio_control.c.

References MODE_SWITCH_AUTO2, and nps_radio_control.

◆ radio_control_script_step_pitch()

void radio_control_script_step_pitch ( double time)
static

Definition at line 154 of file nps_radio_control.c.

References MODE_SWITCH_AUTO2, and nps_radio_control.

◆ radio_control_script_step_roll()

void radio_control_script_step_roll ( double time)
static

Definition at line 140 of file nps_radio_control.c.

References MODE_SWITCH_AUTO2, and nps_radio_control.

◆ radio_control_script_step_yaw()

void radio_control_script_step_yaw ( double time)
static

Definition at line 167 of file nps_radio_control.c.

References MODE_SWITCH_AUTO2, and nps_radio_control.

◆ radio_control_script_takeoff()

void radio_control_script_takeoff ( double time)
static

Definition at line 115 of file nps_radio_control.c.

References MODE_SWITCH_MANUAL, and nps_radio_control.

Referenced by nps_radio_control_available().

Here is the caller graph for this function:

Variable Documentation

◆ nps_radio_control

◆ scripts

rc_script scripts[]
static
Initial value:
= {
}
static void radio_control_script_step_roll(double time)
static void radio_control_script_step_yaw(double time)
static void radio_control_script_hover(double time)
static void radio_control_script_step_pitch(double time)
static void radio_control_script_ff(double time)

Definition at line 69 of file nps_radio_control.c.

Referenced by nps_radio_control_available().