Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/glide_wing_lock/glide_wing_lock.h"
#include "pprzlink/messages.h"
#include "mcu_periph/uart.h"
#include "modules/datalink/downlink.h"
#include "mcu_periph/adc.h"
#include "modules/core/commands.h"
#include "modules/radio_control/radio_control.h"
#include "autopilot.h"
Go to the source code of this file.
Macros | |
#define | WING_POS_DOWN_THRESH 100 |
#define | WING_POS_LOCK_MIN_THRESH 2000 |
#define | WING_POS_LOCK_MAX_THRESH 2100 |
#define | WING_POS_NOMINAL_THRUST 5000 |
#define | WING_POS_LOCK_SWITCH RADIO_AUX2 |
Functions | |
void | glide_wing_lock_init (void) |
void | glide_wing_lock_event () |
void | glide_wing_lock_periodic () |
void | set_rotorcraft_commands (pprz_t *cmd_out, int32_t *cmd_in, bool in_flight, bool motors_on) |
Set Rotorcraft commands. More... | |
Variables | |
struct adc_buf | adcbuf |
int | lock_wings |
Definition in file glide_wing_lock.c.
#define WING_POS_DOWN_THRESH 100 |
Definition at line 42 of file glide_wing_lock.c.
#define WING_POS_LOCK_MAX_THRESH 2100 |
Definition at line 48 of file glide_wing_lock.c.
#define WING_POS_LOCK_MIN_THRESH 2000 |
Definition at line 45 of file glide_wing_lock.c.
#define WING_POS_LOCK_SWITCH RADIO_AUX2 |
Definition at line 54 of file glide_wing_lock.c.
#define WING_POS_NOMINAL_THRUST 5000 |
Definition at line 51 of file glide_wing_lock.c.
void glide_wing_lock_event | ( | void | ) |
Definition at line 63 of file glide_wing_lock.c.
References adcbuf, adc_buf::av_nb_sample, lock_wings, MIN_PPRZ, radio_control, adc_buf::sum, RadioControl::values, WING_POS_DOWN_THRESH, WING_POS_LOCK_MAX_THRESH, WING_POS_LOCK_MIN_THRESH, and WING_POS_LOCK_SWITCH.
void glide_wing_lock_init | ( | void | ) |
Definition at line 58 of file glide_wing_lock.c.
References adc_buf_channel(), and adcbuf.
void glide_wing_lock_periodic | ( | void | ) |
Definition at line 101 of file glide_wing_lock.c.
References adcbuf, adc_buf::av_nb_sample, DefaultChannel, DefaultDevice, and adc_buf::sum.
Set Rotorcraft commands.
Display descent speed in failsafe mode if needed.
Limit thrust and/or yaw depending of the in_flight and motors_on flag status
A default implementation is provided, but the function can be redefined
[out] | cmd_out | output command vector in pprz_t (usually commands array) |
[in/out] | cmd_in input commands to apply, might be affected by in_flight and motors_on param (FIXME really ?) | |
[in] | in_flight | tells if rotorcraft is in flight |
[in] | motors_on | tells if motors are running |
Set Rotorcraft commands.
Set Rotorcraft commands. Limit thrust and/or yaw depending of the in_flight and motors_on flag status
Definition at line 107 of file glide_wing_lock.c.
References lock_wings, and WING_POS_NOMINAL_THRUST.
struct adc_buf adcbuf |
Definition at line 1 of file glide_wing_lock.c.
Referenced by glide_wing_lock_event(), glide_wing_lock_init(), and glide_wing_lock_periodic().
int lock_wings |
Definition at line 39 of file glide_wing_lock.c.
Referenced by glide_wing_lock_event(), and set_rotorcraft_commands().