36 #include "generated/airframe.h"
37 #include "generated/modules.h"
47 #if !(SYS_TIME_FREQUENCY/PERIODIC_FREQUENCY*PERIODIC_FREQUENCY == SYS_TIME_FREQUENCY)
48 #warning "The SYS_TIME_FREQUENCY can not be divided by PERIODIC_FREQUENCY. Make sure this is the case for correct timing."
54 #if (TELEMETRY_FREQUENCY > SYS_TIME_FREQUENCY) || !(SYS_TIME_FREQUENCY/TELEMETRY_FREQUENCY*TELEMETRY_FREQUENCY == SYS_TIME_FREQUENCY)
55 #warning "The TELEMETRY_FREQUENCY can not be faster than the SYS_TIME_FREQUENCY and needs to be dividable by the SYS_TIME_FREQUENCY."
59 #if USE_AHRS && USE_IMU && (defined AHRS_PROPAGATE_FREQUENCY)
60 #if (AHRS_PROPAGATE_FREQUENCY > PERIODIC_FREQUENCY)
61 #warning "PERIODIC_FREQUENCY should be least equal or greater than AHRS_PROPAGATE_FREQUENCY"
62 INFO_VALUE(
"it is recommended to configure in your airframe PERIODIC_FREQUENCY to at least ",
AHRS_PROPAGATE_FREQUENCY)
75 #define SYS_PERIOD (1.f / PERIODIC_FREQUENCY)
76 #define SENSORS_PERIOD (1.f / PERIODIC_FREQUENCY)
77 #define DATALINK_PERIOD (1.f / TELEMETRY_FREQUENCY)
84 modules_sensors_init();
85 modules_estimation_init();
86 modules_radio_control_init();
87 modules_control_init();
88 modules_actuators_init();
89 modules_datalink_init();
90 modules_default_init();
122 modules_sensors_periodic_task();
126 modules_radio_control_periodic_task();
130 modules_estimation_periodic_task();
131 modules_control_periodic_task();
132 modules_default_periodic_task();
133 modules_actuators_periodic_task();
137 modules_mcu_periodic_task();
138 modules_core_periodic_task();
142 modules_datalink_periodic_task();
148 modules_mcu_event_task();
149 modules_core_event_task();
150 modules_sensors_event_task();
151 modules_estimation_event_task();
152 modules_radio_control_event_task();
153 modules_control_event_task();
154 modules_actuators_event_task();
155 modules_datalink_event_task();
156 modules_default_event_task();
Main include for ABI (AirBorneInterface).
void WEAK autopilot_failsafe_checks(void)
Failsafe checks.
#define AHRS_PROPAGATE_FREQUENCY
void main_ap_periodic(void)
tid_t modules_mcu_core_tid
IDs for timers.
tid_t modules_datalink_tid
tid_t modules_radio_control_tid
tid_t modules_sensors_tid
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
tid_t sys_time_register_timer(float duration, sys_time_cb cb)
Register a new system timer.
tid_t sys_time_register_timer_offset(tid_t timer, float offset, sys_time_cb cb)
Register a new system timer with an fixed offset from another one.
static bool sys_time_check_and_ack_timer(tid_t id)
Check if timer has elapsed.
int8_t tid_t
sys_time timer id type