Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
Utility functions and includes for autopilots. More...
#include "firmwares/rotorcraft/autopilot_utils.h"
#include "autopilot.h"
#include "firmwares/rotorcraft/autopilot_rc_helpers.h"
#include "state.h"
#include "subsystems/radio_control.h"
Go to the source code of this file.
Macros | |
#define | THRESHOLD_1_PPRZ (MIN_PPRZ / 2) |
#define | THRESHOLD_2_PPRZ (MAX_PPRZ / 2) |
Functions | |
bool | ap_ahrs_is_aligned (void) |
Display descent speed in failsafe mode if needed. More... | |
uint8_t | ap_mode_of_3way_switch (void) |
get autopilot mode as set by RADIO_MODE 3-way switch More... | |
void WEAK | set_rotorcraft_commands (pprz_t *cmd_out, int32_t *cmd_in, bool in_flight, bool motors_on) |
Get autopilot mode from two 2way switches. More... | |
Utility functions and includes for autopilots.
Definition in file autopilot_utils.c.
#define THRESHOLD_1_PPRZ (MIN_PPRZ / 2) |
Definition at line 86 of file autopilot_utils.c.
Referenced by ap_mode_of_3way_switch().
#define THRESHOLD_2_PPRZ (MAX_PPRZ / 2) |
Definition at line 87 of file autopilot_utils.c.
Referenced by ap_mode_of_3way_switch().
bool ap_ahrs_is_aligned | ( | void | ) |
Display descent speed in failsafe mode if needed.
Definition at line 41 of file autopilot_utils.c.
Referenced by autopilot_generated_on_rc_frame(), autopilot_generated_set_motors_on(), autopilot_static_on_rc_frame(), autopilot_static_set_mode(), and autopilot_static_set_motors_on().
uint8_t ap_mode_of_3way_switch | ( | void | ) |
get autopilot mode as set by RADIO_MODE 3-way switch
Definition at line 90 of file autopilot_utils.c.
Referenced by autopilot_static_on_rc_frame().
void WEAK set_rotorcraft_commands | ( | pprz_t * | cmd_out, |
int32_t * | cmd_in, | ||
bool | in_flight, | ||
bool | motors_on | ||
) |
Get autopilot mode from two 2way switches.
Set Rotorcraft commands.
RADIO_MODE switch just selectes between MANUAL and AUTO. If not MANUAL, the RADIO_AUTO_MODE switch selects between AUTO1 and AUTO2.
This is mainly a cludge for entry level radios with no three-way switch, but two available two-way switches which can be used.Set Rotorcraft commands. Limit thrust and/or yaw depending of the in_flight and motors_on flag status
Definition at line 135 of file autopilot_utils.c.