Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
throttle_curve.c File Reference
+ Include dependency graph for throttle_curve.c:

Go to the source code of this file.

Macros

#define THROTTLE_CURVE_SWITCH_VAL   (MAX_PPRZ*2/THROTTLE_CURVES_NB)
 
#define THROTTLE_CURVE_RPM_FB_P   0.0
 
#define THROTTLE_CURVE_RPM_FB_I   0.0
 
#define THROTTLE_CURVE_RPM_INC_LIMIT   512
 
#define THROTTLE_CURVE_RPM_ID   ABI_BROADCAST
 
#define THROTTLE_CURVE_RPM_ACT   0
 

Functions

static void rpm_cb (uint8_t sender_id, uint16_t *rpm, uint8_t num_act)
 RPM callback for RPM based control throttle curves. More...
 
static void throttle_curve_send_telem (struct transport_tx *trans, struct link_device *dev)
 
void throttle_curve_init (void)
 Initialize the default throttle curve values. More...
 
void throttle_curve_run (pprz_t cmds[], uint8_t ap_mode)
 Run the throttle curve and generate the output throttle and pitch This depends on the FMODE(flight mode) and TRHUST command. More...
 
void nav_throttle_curve_set (uint8_t mode)
 Set a specific throttle curve based on the mode given with this function. More...
 

Variables

static abi_event rpm_ev
 
struct throttle_curve_t throttle_curve
 

Detailed Description

Author
C. De Wagter and Freek van Tienen Throttle Curve Mixers

Definition in file throttle_curve.c.

Macro Definition Documentation

◆ THROTTLE_CURVE_RPM_ACT

#define THROTTLE_CURVE_RPM_ACT   0

Definition at line 54 of file throttle_curve.c.

◆ THROTTLE_CURVE_RPM_FB_I

#define THROTTLE_CURVE_RPM_FB_I   0.0

Definition at line 42 of file throttle_curve.c.

◆ THROTTLE_CURVE_RPM_FB_P

#define THROTTLE_CURVE_RPM_FB_P   0.0

Definition at line 38 of file throttle_curve.c.

◆ THROTTLE_CURVE_RPM_ID

#define THROTTLE_CURVE_RPM_ID   ABI_BROADCAST

Definition at line 51 of file throttle_curve.c.

◆ THROTTLE_CURVE_RPM_INC_LIMIT

#define THROTTLE_CURVE_RPM_INC_LIMIT   512

Definition at line 46 of file throttle_curve.c.

◆ THROTTLE_CURVE_SWITCH_VAL

#define THROTTLE_CURVE_SWITCH_VAL   (MAX_PPRZ*2/THROTTLE_CURVES_NB)

Definition at line 34 of file throttle_curve.c.

Function Documentation

◆ nav_throttle_curve_set()

void nav_throttle_curve_set ( uint8_t  mode)

Set a specific throttle curve based on the mode given with this function.

Definition at line 208 of file throttle_curve.c.

References mode, throttle_curve_t::nav_mode, and throttle_curve.

◆ rpm_cb()

static void rpm_cb ( uint8_t  sender_id,
uint16_t rpm,
uint8_t  num_act 
)
static

RPM callback for RPM based control throttle curves.

Definition at line 102 of file throttle_curve.c.

References rpm, throttle_curve_t::rpm_meas, throttle_curve_t::rpm_measured, throttle_curve, and THROTTLE_CURVE_RPM_ACT.

Referenced by throttle_curve_init().

+ Here is the caller graph for this function:

◆ throttle_curve_init()

◆ throttle_curve_run()

◆ throttle_curve_send_telem()

static void throttle_curve_send_telem ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Variable Documentation

◆ rpm_ev

abi_event rpm_ev
static

Definition at line 56 of file throttle_curve.c.

Referenced by throttle_curve_init().

◆ throttle_curve

struct throttle_curve_t throttle_curve
Initial value:
= {
.nb_curves = THROTTLE_CURVES_NB,
.curves = THROTTLE_CURVES
}

Definition at line 60 of file throttle_curve.c.

Referenced by nav_throttle_curve_set(), rpm_cb(), throttle_curve_init(), throttle_curve_run(), and throttle_curve_send_telem().