54 PRINT_CONFIG_MSG_VALUE(
"USE_BARO_BOARD is TRUE, reading onboard baro: ",
BARO_BOARD)
69 #include "generated/modules.h"
77 PRINT_CONFIG_VAR(PERIODIC_FREQUENCY)
79 #if !(SYS_TIME_FREQUENCY/PERIODIC_FREQUENCY*PERIODIC_FREQUENCY == SYS_TIME_FREQUENCY)
80 #warning "The SYS_TIME_FREQUENCY can not be divided by PERIODIC_FREQUENCY. Make sure this is the case for correct timing."
91 PRINT_CONFIG_VAR(MODULES_FREQUENCY)
93 #ifndef BARO_PERIODIC_FREQUENCY
94 #define BARO_PERIODIC_FREQUENCY 50
98 #if USE_AHRS && USE_IMU && (defined AHRS_PROPAGATE_FREQUENCY)
99 #if (AHRS_PROPAGATE_FREQUENCY > PERIODIC_FREQUENCY)
100 #warning "PERIODIC_FREQUENCY should be least equal or greater than AHRS_PROPAGATE_FREQUENCY"
101 INFO_VALUE(
"it is recommended to configure in your airframe PERIODIC_FREQUENCY to at least ",
AHRS_PROPAGATE_FREQUENCY)
119 #if defined(PPRZ_TRIG_INT_COMPR_FLASH)
120 pprz_trig_int_init();
168 #if PERIODIC_FREQUENCY != MODULES_FREQUENCY
193 #if PERIODIC_FREQUENCY == MODULES_FREQUENCY
197 modules_periodic_task();
202 modules_periodic_task();
236 #if defined DATALINK || defined SITL
256 #if PERIODIC_TELEMETRY
264 #define RC_LOST_MODE AP_MODE_FAILSAFE
287 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 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).
uint16_t flight_time
flight time in seconds
tid_t failsafe_tid
id for failsafe_check() timer
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)
Interface for electrical status: supply voltage, current, battery status, etc.
Architecture independent timing functions.
bool autopilot_in_flight(void)
get in_flight flag
void motor_mixing_init(void)
void radio_control_periodic_task(void)
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.
#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 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
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.
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