Paparazzi UAS  v6.1.0_stable
Paparazzi is a free software Unmanned Aircraft System.
main_ap.c File Reference
#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"
+ Include dependency graph for main_ap.c:

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
 

Detailed Description

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.

Macro Definition Documentation

◆ ABI_C

#define ABI_C

Definition at line 33 of file main_ap.c.

◆ COMMAND_PITCH_TRIM

#define COMMAND_PITCH_TRIM   0

Definition at line 59 of file main_ap.c.

◆ COMMAND_ROLL_TRIM

#define COMMAND_ROLL_TRIM   0

Definition at line 55 of file main_ap.c.

◆ COMMAND_YAW_TRIM

#define COMMAND_YAW_TRIM   0

Definition at line 63 of file main_ap.c.

◆ DATALINK_PERIOD

#define DATALINK_PERIOD   (1.f / TELEMETRY_FREQUENCY)

Definition at line 102 of file main_ap.c.

◆ MODULES_C

#define MODULES_C

Definition at line 31 of file main_ap.c.

◆ SENSORS_PERIOD

#define SENSORS_PERIOD   (1.f / PERIODIC_FREQUENCY)

Definition at line 101 of file main_ap.c.

◆ SYS_PERIOD

#define SYS_PERIOD   (1.f / PERIODIC_FREQUENCY)

Definition at line 100 of file main_ap.c.

◆ TELEMETRY_FREQUENCY

#define TELEMETRY_FREQUENCY   60

Definition at line 77 of file main_ap.c.

Function Documentation

◆ event_task_ap()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handle_periodic_tasks_ap()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_ap()

◆ reporting_task()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ modules_datalink_tid

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().

◆ modules_gnc_tid

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().

◆ modules_mcu_core_tid

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().

◆ modules_sensors_tid

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().