Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
#include "throttle_curve.h"
#include "subsystems/commands.h"
#include "autopilot.h"
#include "subsystems/radio_control.h"
#include "subsystems/abi.h"
#include "subsystems/datalink/telemetry.h"
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 |
Definition in file throttle_curve.c.
#define THROTTLE_CURVE_RPM_ACT 0 |
Definition at line 54 of file throttle_curve.c.
Referenced by rpm_cb().
#define THROTTLE_CURVE_RPM_FB_I 0.0 |
Definition at line 42 of file throttle_curve.c.
Referenced by throttle_curve_init().
#define THROTTLE_CURVE_RPM_FB_P 0.0 |
Definition at line 38 of file throttle_curve.c.
Referenced by throttle_curve_init().
#define THROTTLE_CURVE_RPM_ID ABI_BROADCAST |
Definition at line 51 of file throttle_curve.c.
Referenced by throttle_curve_init().
#define THROTTLE_CURVE_RPM_INC_LIMIT 512 |
Definition at line 46 of file throttle_curve.c.
Referenced by throttle_curve_run().
#define THROTTLE_CURVE_SWITCH_VAL (MAX_PPRZ*2/THROTTLE_CURVES_NB) |
Definition at line 34 of file throttle_curve.c.
Referenced by throttle_curve_run().
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, and throttle_curve_t::nav_mode.
RPM callback for RPM based control throttle curves.
Definition at line 102 of file throttle_curve.c.
References throttle_curve_t::rpm_meas, throttle_curve_t::rpm_measured, and THROTTLE_CURVE_RPM_ACT.
Referenced by throttle_curve_init().
void throttle_curve_init | ( | void | ) |
Initialize the default throttle curve values.
Definition at line 79 of file throttle_curve.c.
References throttle_curve_t::coll_trim, curve_t::collective, throttle_curve_t::collective, throttle_curve_t::curves, DefaultPeriodic, throttle_curve_t::mode, throttle_curve_t::nav_mode, register_periodic_telemetry(), rpm_cb(), throttle_curve_t::rpm_err_sum, throttle_curve_t::rpm_fb_i, throttle_curve_t::rpm_fb_p, throttle_curve_t::rpm_measured, curve_t::throttle, throttle_curve_t::throttle, THROTTLE_CURVE_RPM_FB_I, THROTTLE_CURVE_RPM_FB_P, THROTTLE_CURVE_RPM_ID, throttle_curve_send_telem(), and throttle_curve_t::throttle_trim.
Run the throttle curve and generate the output throttle and pitch This depends on the FMODE(flight mode) and TRHUST command.
Definition at line 115 of file throttle_curve.c.
References AP_MODE_FAILSAFE, AP_MODE_NAV, autopilot_get_motors_on(), throttle_curve_t::coll_trim, curve_t::collective, throttle_curve_t::collective, throttle_curve_t::curves, MAX_PPRZ, throttle_curve_t::mode, mode, throttle_curve_t::nav_mode, curve_t::nb_points, radio_control, curve_t::rpm, throttle_curve_t::rpm, throttle_curve_t::rpm_err_sum, throttle_curve_t::rpm_fb_i, throttle_curve_t::rpm_fb_p, throttle_curve_t::rpm_meas, throttle_curve_t::rpm_measured, curve_t::throttle, throttle_curve_t::throttle, THROTTLE_CURVE_RPM_INC_LIMIT, THROTTLE_CURVE_SWITCH_VAL, throttle_curve_t::throttle_trim, and RadioControl::values.
Referenced by main_periodic().
|
static |
Definition at line 68 of file throttle_curve.c.
References throttle_curve_t::collective, throttle_curve_t::mode, throttle_curve_t::rpm, throttle_curve_t::rpm_err_sum, throttle_curve_t::rpm_meas, and throttle_curve_t::throttle.
Referenced by throttle_curve_init().
|
static |
Definition at line 56 of file throttle_curve.c.
struct throttle_curve_t throttle_curve |
Definition at line 60 of file throttle_curve.c.