|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Some helper functions to check RC sticks. More...
#include "generated/airframe.h"#include "modules/radio_control/radio_control.h"#include "generated/modules.h"Go to the source code of this file.
Macros | |
| #define | AUTOPILOT_THROTTLE_THRESHOLD (MAX_PPRZ / 20) |
| #define | AUTOPILOT_YAW_THRESHOLD (MAX_PPRZ * 19 / 20) |
| #define | AUTOPILOT_STICK_CENTER_THRESHOLD (MAX_PPRZ * 1 / 20) |
| #define | THROTTLE_STICK_DOWN() |
| #define | YAW_STICK_PUSHED() |
| #define | YAW_STICK_CENTERED() |
| #define | PITCH_STICK_CENTERED() |
| #define | ROLL_STICK_CENTERED() |
| #define | THROTTLE_STICK_DOWN_FROM_RC(_rc) |
Functions | |
| static bool | rc_mode_switch (uint8_t chan, uint8_t pos, uint8_t max) |
| RC mode switch position helper switch positions threshold are evenly spaced. | |
| static bool | rc_attitude_sticks_centered (void) |
| Convenience macro for 3way switch. | |
| static bool | kill_switch_is_on (void) |
| static uint8_t | percent_from_rc (int channel) |
Some helper functions to check RC sticks.
Definition in file autopilot_rc_helpers.h.
| #define AUTOPILOT_STICK_CENTER_THRESHOLD (MAX_PPRZ * 1 / 20) |
Definition at line 38 of file autopilot_rc_helpers.h.
| #define AUTOPILOT_THROTTLE_THRESHOLD (MAX_PPRZ / 20) |
Definition at line 35 of file autopilot_rc_helpers.h.
| #define AUTOPILOT_YAW_THRESHOLD (MAX_PPRZ * 19 / 20) |
Definition at line 36 of file autopilot_rc_helpers.h.
| #define PITCH_STICK_CENTERED | ( | ) |
Definition at line 49 of file autopilot_rc_helpers.h.
Referenced by autopilot_arming_check_valid(), autopilot_arming_check_valid(), and rc_attitude_sticks_centered().
| #define ROLL_STICK_CENTERED | ( | ) |
Definition at line 52 of file autopilot_rc_helpers.h.
Referenced by autopilot_arming_check_valid(), autopilot_arming_check_valid(), and rc_attitude_sticks_centered().
| #define THROTTLE_STICK_DOWN | ( | ) |
Definition at line 41 of file autopilot_rc_helpers.h.
Referenced by autopilot_arming_check_motors_on(), autopilot_arming_check_motors_on(), autopilot_arming_check_motors_on(), autopilot_arming_check_valid(), and autopilot_arming_check_valid().
| #define THROTTLE_STICK_DOWN_FROM_RC | ( | _rc | ) |
Definition at line 57 of file autopilot_rc_helpers.h.
Referenced by read_rc_setpoint_heading(), stabilization_attitude_read_rc_setpoint_eulers(), stabilization_attitude_read_rc_setpoint_eulers_f(), and stabilization_rate_read_rc().
| #define YAW_STICK_CENTERED | ( | ) |
Definition at line 46 of file autopilot_rc_helpers.h.
Referenced by autopilot_arming_check_motors_on(), autopilot_arming_check_valid(), autopilot_arming_check_valid(), and rc_attitude_sticks_centered().
| #define YAW_STICK_PUSHED | ( | ) |
Definition at line 43 of file autopilot_rc_helpers.h.
Referenced by autopilot_arming_check_motors_on().
|
inlinestatic |
Definition at line 108 of file autopilot_rc_helpers.h.
Referenced by autopilot_arming_check_motors_on(), autopilot_arming_check_motors_on(), autopilot_arming_set(), and autopilot_static_on_rc_frame().
|
inlinestatic |
Definition at line 114 of file autopilot_rc_helpers.h.
References MAX_PPRZ, and radio_control.
|
inlinestatic |
Convenience macro for 3way switch.
Definition at line 93 of file autopilot_rc_helpers.h.
References PITCH_STICK_CENTERED, ROLL_STICK_CENTERED, and YAW_STICK_CENTERED.
Referenced by autopilot_arming_check_motors_on().
RC mode switch position helper switch positions threshold are evenly spaced.
| [in] | chan | RC mode channel number |
| [in] | pos | switch position to be tested |
| [in] | max | maximum number of position of the switch |
Definition at line 68 of file autopilot_rc_helpers.h.
References MAX_PPRZ, MIN_PPRZ, p, radio_control, and RC_OK.