38 #if (defined MODE_MANUAL) && (defined MODE_AUTO1)
40 #if defined RADIO_MODE_2x3
42 #define THRESHOLD_1d3_PPRZ (MAX_PPRZ / 3)
43 #define THRESHOLD_2d3_PPRZ ((MAX_PPRZ / 3) * 2)
56 uint8_t ap_mode_of_3x2way_switch(
void)
62 if (
val < THRESHOLD_1d3_PPRZ) {
64 }
else if (
val < THRESHOLD_2d3_PPRZ) {
73 #define THRESHOLD_1_PPRZ (MIN_PPRZ / 2)
74 #define THRESHOLD_2_PPRZ (MAX_PPRZ / 2)
98 #if defined RADIO_AUTO_MODE || defined(__DOXYGEN__)
99 uint8_t ap_mode_of_two_switches(
void)
125 #if !ROTORCRAFT_IS_HELI
126 #if !ROTORCRAFT_COMMANDS_YAW_ALWAYS_ENABLED && defined(COMMAND_YAW)
128 cmd_in[COMMAND_YAW] = 0;
132 cmd_in[COMMAND_THRUST] = 0;
136 cmd_out[COMMAND_ROLL] = cmd_in[COMMAND_ROLL];
139 cmd_out[COMMAND_PITCH] = cmd_in[COMMAND_PITCH];
142 cmd_out[COMMAND_YAW] = cmd_in[COMMAND_YAW];
144 cmd_out[COMMAND_THRUST] = cmd_in[COMMAND_THRUST];
Core autopilot interface common to all firmwares.
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
struct RadioControl radio_control
Generic interface for radio control modules.
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
uint8_t autopilot_mode_auto2
Some helper functions to check RC sticks.
#define MODE_MANUAL
Default RC mode.
void WEAK set_rotorcraft_commands(pprz_t *cmd_out, int32_t *cmd_in, bool in_flight, bool motors_on)
Display descent speed in failsafe mode if needed.
Utility functions and includes for autopilots.
#define FAILSAFE_DESCENT_SPEED
Set descent speed in failsafe mode.
#define THRESHOLD_1_PPRZ
Display descent speed in failsafe mode if needed.
uint8_t ap_mode_of_3way_switch(void)
get autopilot mode as set by RADIO_MODE 3-way switch
API to get/set the generic vehicle states.
int int32_t
Typedef defining 32 bit int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.