40 #ifndef AUTOPILOT_DISABLE_AHRS_KILL
53 #if defined RADIO_MODE_2x3
55 #define THRESHOLD_1d3_PPRZ (MAX_PPRZ / 3)
56 #define THRESHOLD_2d3_PPRZ ((MAX_PPRZ / 3) * 2)
69 uint8_t ap_mode_of_3x2way_switch(
void)
75 if (val < THRESHOLD_1d3_PPRZ) {
77 }
else if (val < THRESHOLD_2d3_PPRZ) {
86 #define THRESHOLD_1_PPRZ (MIN_PPRZ / 2)
87 #define THRESHOLD_2_PPRZ (MAX_PPRZ / 2)
111 #if defined RADIO_AUTO_MODE || defined(__DOXYGEN__)
112 uint8_t ap_mode_of_two_switches(
void)
137 #if !ROTORCRAFT_IS_HELI
138 #if !ROTORCRAFT_COMMANDS_YAW_ALWAYS_ENABLED
140 cmd_in[COMMAND_YAW] = 0;
144 cmd_in[COMMAND_THRUST] = 0;
147 cmd_out[COMMAND_ROLL] = cmd_in[COMMAND_ROLL];
148 cmd_out[COMMAND_PITCH] = cmd_in[COMMAND_PITCH];
149 cmd_out[COMMAND_YAW] = cmd_in[COMMAND_YAW];
150 cmd_out[COMMAND_THRUST] = cmd_in[COMMAND_THRUST];
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.
uint8_t ap_mode_of_3way_switch(void)
get autopilot mode as set by RADIO_MODE 3-way switch
#define FAILSAFE_DESCENT_SPEED
Set descent speed in failsafe mode.
Utility functions and includes for autopilots.
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
bool ap_ahrs_is_aligned(void)
Display descent speed in failsafe mode if needed.
#define MODE_MANUAL
Default RC mode.
Some helper functions to check RC sticks.
static bool stateIsAttitudeValid(void)
Test if attitudes are valid.
uint8_t autopilot_mode_auto2
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
struct RadioControl radio_control
Core autopilot interface common to all firmwares.
API to get/set the generic vehicle states.