58 PRINT_CONFIG_MSG_VALUE(
"USE_BARO_BOARD is TRUE, reading onboard baro: ",
BARO_BOARD)
83 #include "generated/modules.h"
91 PRINT_CONFIG_VAR(PERIODIC_FREQUENCY)
101 PRINT_CONFIG_VAR(MODULES_FREQUENCY)
103 #ifndef BARO_PERIODIC_FREQUENCY
104 #define BARO_PERIODIC_FREQUENCY 50
108 #if USE_AHRS && USE_IMU && (defined AHRS_PROPAGATE_FREQUENCY)
109 #if (AHRS_PROPAGATE_FREQUENCY > PERIODIC_FREQUENCY)
110 #warning "PERIODIC_FREQUENCY should be least equal or greater than AHRS_PROPAGATE_FREQUENCY"
111 INFO_VALUE(
"it is recommended to configure in your airframe PERIODIC_FREQUENCY to at least ",
AHRS_PROPAGATE_FREQUENCY)
130 #if LIMIT_EVENT_POLLING
166 #if defined(PPRZ_TRIG_INT_COMPR_FLASH)
167 pprz_trig_int_init();
249 modules_periodic_task();
287 #if defined DATALINK || defined SITL
307 #if PERIODIC_TELEMETRY
315 #define RC_LOST_MODE AP_MODE_FAILSAFE
331 #if FAILSAFE_ON_BAT_CRITICAL
341 #
if NO_GPS_LOST_WITH_RC_VALID
372 #if FAILSAFE_GROUND_DETECT || KILL_ON_GROUND_DETECT
376 modules_event_task();
Interface to align the AHRS via low-passed measurements at startup.
void mcu_init(void)
Microcontroller peripherals initialization.
Dispatcher to register actual AHRS implementations.
Common barometric sensor implementation.
STATIC_INLINE void telemetry_periodic(void)
#define AHRS_PROPAGATE_FREQUENCY
void autopilot_init(void)
Autopilot inititalization.
Periodic telemetry system header (includes downlink utility and generated code).
uint16_t autopilot_flight_time
flight time in seconds.
Handling of messages coming from ground and other A/Cs.
Main include for ABI (AirBorneInterface).
STATIC_INLINE void main_init(void)
struct Imu imu
global IMU state
STATIC_INLINE void handle_periodic_tasks(void)
tid_t modules_tid
id for modules_periodic_task() timer
void autopilot_check_in_flight(bool motors_on)
void ahrs_init(void)
AHRS initialization.
void radio_control_init(void)
static void send_autopilot_version(struct transport_tx *trans, struct link_device *dev)
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
#define RadioControlEvent(_received_frame_handler)
tid_t radio_control_tid
id for radio_control_periodic_task() timer
Hardware independent API for actuators (servos, motor controllers).
void electrical_init(void)
bool bat_critical
battery critical status
tid_t telemetry_tid
id for telemetry_periodic() timer
Interface for electrical status: supply voltage, current, battery status, etc.
Architecture independent timing functions.
void motor_mixing_init(void)
void radio_control_periodic_task(void)
Device independent GPS code (interface)
STATIC_INLINE void main_event(void)
int8_t tid_t
sys_time timer id type
#define DefaultPeriodic
Set default periodic telemetry.
void autopilot_on_rc_frame(void)
Get autopilot mode from two 2way switches.
Hardware independent code for commands handling.
struct RadioControl radio_control
tid_t failsafe_tid
id for failsafe_check() timer
Inertial Measurement Unit interface.
struct OrientationReps body_to_imu
rotation from body to imu frame
void autopilot_periodic(void)
void electrical_periodic(void)
#define DefaultChannel
SITL.
tid_t main_periodic_tid
id for main_periodic() timer
Arch independent mcu ( Micro Controller Unit ) utilities.
pprz_t commands[COMMANDS_NB]
Storage of intermediate command values.
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.
General stabilization interface for rotorcrafts.
#define TELEMETRY_FREQUENCY
Common code for AP and FBW telemetry.
arch independent LED (Light Emitting Diodes) API
STATIC_INLINE void main_periodic(void)
void mcu_event(void)
MCU event functions.
struct Electrical electrical
void intermcu_set_actuators(pprz_t *command_values, uint8_t ap_mode)
STATIC_INLINE void failsafe_check(void)
void waypoints_localize_all(void)
update local ENU coordinates of global waypoints
#define BARO_PERIODIC_FREQUENCY
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
void autopilot_set_mode(uint8_t new_autopilot_mode)
void ahrs_aligner_init(void)
static void DetectGroundEvent(void)
Ground detection based on vertical acceleration.
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).
tid_t electrical_tid
id for electrical_periodic() timer
#define RC_LOST_MODE
mode to enter when RC is lost while using a mode with RC input (not AP_MODE_NAV)