55 PRINT_CONFIG_MSG_VALUE(
"USE_BARO_BOARD is TRUE, reading onboard baro: ",
BARO_BOARD)
74 #include "generated/modules.h"
82 PRINT_CONFIG_VAR(PERIODIC_FREQUENCY)
84 #if !(SYS_TIME_FREQUENCY/PERIODIC_FREQUENCY*PERIODIC_FREQUENCY == SYS_TIME_FREQUENCY)
85 #warning "The SYS_TIME_FREQUENCY can not be divided by PERIODIC_FREQUENCY. Make sure this is the case for correct timing."
96 PRINT_CONFIG_VAR(MODULES_FREQUENCY)
101 #if USE_AHRS && USE_IMU && (defined AHRS_PROPAGATE_FREQUENCY)
102 #if (AHRS_PROPAGATE_FREQUENCY > PERIODIC_FREQUENCY)
103 #warning "PERIODIC_FREQUENCY should be least equal or greater than AHRS_PROPAGATE_FREQUENCY"
104 INFO_VALUE(
"it is recommended to configure in your airframe PERIODIC_FREQUENCY to at least ",
AHRS_PROPAGATE_FREQUENCY)
122 #if defined(PPRZ_TRIG_INT_COMPR_FLASH)
123 pprz_trig_int_init();
154 #if USE_GENERATED_AUTOPILOT
181 #if PERIODIC_FREQUENCY != MODULES_FREQUENCY
206 #if PERIODIC_FREQUENCY == MODULES_FREQUENCY
210 modules_periodic_task();
215 modules_periodic_task();
249 #if USE_THROTTLE_CURVES
263 #if defined DATALINK || defined SITL
283 #if PERIODIC_TELEMETRY
291 #define RC_LOST_MODE AP_MODE_FAILSAFE
296 #if !USE_GENERATED_AUTOPILOT
308 #if FAILSAFE_ON_BAT_CRITICAL
318 #
if NO_GPS_LOST_WITH_RC_VALID
331 #endif // !USE_GENERATED_AUTOPILOT
351 modules_event_task();
void mcu_init(void)
Microcontroller peripherals initialization.
Dispatcher to register actual AHRS implementations.
void failsafe_check(void)
bool use_rc
enable/disable RC input
Common barometric sensor implementation.
#define AP_MODE_KILL
Static autopilot modes.
#define AHRS_PROPAGATE_FREQUENCY
Periodic telemetry system header (includes downlink utility and generated code).
bool autopilot_get_motors_on(void)
get motors status
Handling of messages coming from ground and other A/Cs.
void autopilot_generated_init(void)
Main include for ABI (AirBorneInterface).
void intermcu_periodic(void)
uint16_t flight_time
flight time in seconds
tid_t failsafe_tid
id for failsafe_check() timer
bool autopilot_set_mode(uint8_t new_autopilot_mode)
set autopilot mode
void autopilot_init(void)
Autopilot initialization function.
struct Imu imu
global IMU state
void WEAK autopilot_check_in_flight(bool motors_on)
in flight check utility function actual implementation is firmware dependent
void ahrs_init(void)
AHRS initialization.
struct pprz_autopilot autopilot
Global autopilot structure.
tid_t electrical_tid
id for electrical_periodic() timer
void radio_control_init(void)
void telemetry_periodic(void)
#define RadioControlEvent(_received_frame_handler)
Hardware independent API for actuators (servos, motor controllers).
void electrical_init(void)
bool bat_critical
battery critical status
Interface for electrical status: supply voltage, current, battery status, etc.
Architecture independent timing functions.
bool autopilot_in_flight(void)
get in_flight flag
void radio_control_periodic_task(void)
#define RC_LOST_MODE
mode to enter when RC is lost while using a mode with RC input (not AP_MODE_NAV)
Device independent GPS code (interface)
int8_t tid_t
sys_time timer id type
tid_t radio_control_tid
id for radio_control_periodic_task() timer
#define DefaultPeriodic
Set default periodic telemetry.
Hardware independent code for commands handling.
struct RadioControl radio_control
#define TELEMETRY_FREQUENCY
void WEAK autopilot_event(void)
AP event call.
Inertial Measurement Unit interface.
struct OrientationReps body_to_imu
rotation from body to imu frame
void autopilot_static_init(void)
Static autopilot API.
void electrical_periodic(void)
Core autopilot interface common to all firmwares.
tid_t telemetry_tid
id for telemetry_periodic() timer
Arch independent mcu ( Micro Controller Unit ) utilities.
pprz_t commands[COMMANDS_NB]
Storage of intermediate command values.
tid_t main_periodic_tid
id for main_periodic() timer
API to get/set the generic vehicle states.
Persistent settings interface.
static bool sys_time_check_and_ack_timer(tid_t id)
Check if timer has elapsed.
#define BARO_PERIODIC_FREQUENCY
void throttle_curve_run(pprz_t cmds[], uint8_t ap_mode)
Run the throttle curve and generate the output throttle and pitch This depends on the FMODE(flight mo...
Common code for AP and FBW telemetry.
void autopilot_periodic(void)
AP periodic call.
void autopilot_on_rc_frame(void)
RC frame handler.
arch independent LED (Light Emitting Diodes) API
void handle_periodic_tasks(void)
void mcu_event(void)
MCU event functions.
struct Electrical electrical
void intermcu_set_actuators(pprz_t *command_values, uint8_t ap_mode)
void waypoints_localize_all(void)
update local ENU coordinates of global waypoints
void autopilot_send_version(void)
send autopilot version
tid_t modules_tid
id for modules_periodic_task() timer
tid_t sys_time_register_timer(float duration, sys_time_cb cb)
Register a new system timer.
static struct FloatQuat * orientationGetQuat_f(struct OrientationReps *orientation)
Get vehicle body attitude quaternion (float).
uint8_t autopilot_get_mode(void)
get autopilot mode