![]() |
Paparazzi UAS
v6.1.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include <math.h>
#include "firmwares/fixedwing/main_ap.h"
#include "mcu.h"
#include "mcu_periph/sys_time.h"
#include "modules/intermcu/inter_mcu.h"
#include "modules/intermcu/link_mcu.h"
#include "generated/airframe.h"
#include "generated/modules.h"
#include "modules/core/abi.h"
#include "led.h"
Go to the source code of this file.
Macros | |
#define | MODULES_C |
#define | ABI_C |
#define | COMMAND_ROLL_TRIM 0 |
#define | COMMAND_PITCH_TRIM 0 |
#define | COMMAND_YAW_TRIM 0 |
#define | TELEMETRY_FREQUENCY 60 |
#define | SYS_PERIOD (1.f / PERIODIC_FREQUENCY) |
#define | SENSORS_PERIOD (1.f / PERIODIC_FREQUENCY) |
#define | DATALINK_PERIOD (1.f / TELEMETRY_FREQUENCY) |
Functions | |
void | init_ap (void) |
void | handle_periodic_tasks_ap (void) |
void | reporting_task (void) |
Send a series of initialisation messages followed by a stream of periodic ones. More... | |
void | event_task_ap (void) |
Variables | |
tid_t | modules_mcu_core_tid |
IDs for timers. More... | |
tid_t | modules_sensors_tid |
tid_t | modules_gnc_tid |
tid_t | modules_datalink_tid |
AP ( AutoPilot ) tasks
This process is reponsible for the collecting the different sensors data, calling the appropriate estimation algorithms and running the different control loops.
Definition in file main_ap.c.
#define DATALINK_PERIOD (1.f / TELEMETRY_FREQUENCY) |
void event_task_ap | ( | void | ) |
Definition at line 213 of file main_ap.c.
References autopilot_on_rc_frame(), inter_mcu_received_fbw, and link_mcu_event_task().
Referenced by sim_periodic_task().
void handle_periodic_tasks_ap | ( | void | ) |
Definition at line 157 of file main_ap.c.
References datalink_time, LED_PERIODIC, modules_datalink_tid, modules_gnc_tid, modules_mcu_core_tid, modules_sensors_tid, reporting_task(), sys_time_check_and_ack_timer(), and TELEMETRY_FREQUENCY.
Referenced by sim_periodic_task().
void init_ap | ( | void | ) |
Definition at line 104 of file main_ap.c.
References ap_state, Imu::body_to_imu, COMMAND_PITCH_TRIM, COMMAND_ROLL_TRIM, COMMAND_YAW_TRIM, DATALINK_PERIOD, f, imu, modules_datalink_tid, modules_gnc_tid, modules_mcu_core_tid, modules_sensors_tid, orientationGetQuat_f(), PPRZ_MUTEX_LOCK, PPRZ_MUTEX_UNLOCK, SENSORS_PERIOD, SYS_PERIOD, sys_time_register_timer(), and sys_time_register_timer_offset().
Referenced by sim_init().
void reporting_task | ( | void | ) |
Send a series of initialisation messages followed by a stream of periodic ones.
Definition at line 192 of file main_ap.c.
References autopilot_send_version(), DefaultChannel, DefaultDevice, and DefaultPeriodic.
Referenced by handle_periodic_tasks_ap().
tid_t modules_datalink_tid |
Definition at line 98 of file main_ap.c.
Referenced by handle_periodic_tasks(), handle_periodic_tasks_ap(), init_ap(), and main_init().
tid_t modules_gnc_tid |
Definition at line 97 of file main_ap.c.
Referenced by handle_periodic_tasks(), handle_periodic_tasks_ap(), init_ap(), and main_init().
tid_t modules_mcu_core_tid |
IDs for timers.
Definition at line 94 of file main_ap.c.
Referenced by handle_periodic_tasks(), handle_periodic_tasks_ap(), init_ap(), and main_init().
tid_t modules_sensors_tid |
Definition at line 95 of file main_ap.c.
Referenced by handle_periodic_tasks(), handle_periodic_tasks_ap(), init_ap(), and main_init().