|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
28 #include "pprzlink/messages.h"
41 #ifndef WING_POS_DOWN_THRESH
42 #define WING_POS_DOWN_THRESH 100
44 #ifndef WING_POS_LOCK_MIN_THRESH
45 #define WING_POS_LOCK_MIN_THRESH 2000
47 #ifndef WING_POS_LOCK_MAX_THRESH
48 #define WING_POS_LOCK_MAX_THRESH 2100
50 #ifndef WING_POS_NOMINAL_THRUST
51 #define WING_POS_NOMINAL_THRUST 5000
53 #ifndef WING_POS_LOCK_SWITCH
54 #define WING_POS_LOCK_SWITCH RADIO_AUX2
65 static int lockstate = 0;
109 if (!(in_flight)) { cmd_in[COMMAND_YAW] = 0; }
110 if (!(motors_on)) { cmd_in[COMMAND_THRUST] = 0; }
111 cmd_out[COMMAND_ROLL] = cmd_in[COMMAND_ROLL];
112 cmd_out[COMMAND_PITCH] = cmd_in[COMMAND_PITCH];
113 cmd_out[COMMAND_YAW] = cmd_in[COMMAND_YAW];
114 cmd_out[COMMAND_THRUST] = cmd_in[COMMAND_THRUST];
116 if (
lock_wings == 1 && motors_on && cmd_out[COMMAND_THRUST] > 0) {
119 cmd_out[COMMAND_THRUST] = 0;
#define WING_POS_LOCK_MAX_THRESH
void glide_wing_lock_periodic()
void adc_buf_channel(uint8_t adc_channel, struct adc_buf *s, uint8_t av_nb_sample)
Link between ChibiOS ADC drivers and Paparazzi adc_buffers.
void set_rotorcraft_commands(pprz_t *cmd_out, int32_t *cmd_in, bool in_flight, bool motors_on)
Set Rotorcraft commands.
arch independent ADC (Analog to Digital Converter) API
#define WING_POS_NOMINAL_THRUST
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define WING_POS_LOCK_MIN_THRESH
void glide_wing_lock_init(void)
Common code for AP and FBW telemetry.
#define WING_POS_DOWN_THRESH
void glide_wing_lock_event()
Hardware independent code for commands handling.
#define WING_POS_LOCK_SWITCH
struct RadioControl radio_control
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.