Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
demo_ahrs_actuators.c File Reference

Demo prog with ahrs and simple roll/pitch commands to actuators. More...

#include <inttypes.h>
#include "subsystems/datalink/telemetry.h"
#include "subsystems/datalink/datalink.h"
#include "subsystems/datalink/downlink.h"
#include "subsystems/abi.h"
#include "generated/airframe.h"
#include "generated/settings.h"
#include "std.h"
#include "mcu.h"
#include "mcu_periph/sys_time.h"
#include "led.h"
#include "state.h"
#include "subsystems/imu.h"
#include "subsystems/ahrs.h"
#include "subsystems/ahrs/ahrs_aligner.h"
#include "subsystems/commands.h"
#include "subsystems/actuators.h"
#include "subsystems/settings.h"
#include "pprz_version.h"
+ Include dependency graph for demo_ahrs_actuators.c:

Go to the source code of this file.

Macros

#define PERIODIC_C_MAIN
 
#define ABI_C
 
#define DATALINK_C
 
#define DEMO_MAX_ROLL   RadOfDeg(65)
 
#define DEMO_MAX_PITCH   RadOfDeg(65)
 

Functions

static void main_init (void)
 
static void main_periodic_task (void)
 
static void main_event_task (void)
 
static void send_alive (struct transport_tx *trans, struct link_device *dev)
 
static void send_autopilot_version (struct transport_tx *trans, struct link_device *dev)
 
static void send_actuators (struct transport_tx *trans, struct link_device *dev)
 
static void send_commands (struct transport_tx *trans, struct link_device *dev)
 
int main (void)
 
void dl_parse_msg (void)
 Should be called when chars are available in dl_buffer. More...
 

Variables

uint16_t datalink_time = 0
 

Detailed Description

Demo prog with ahrs and simple roll/pitch commands to actuators.

Definition in file demo_ahrs_actuators.c.

Macro Definition Documentation

#define ABI_C

Definition at line 31 of file demo_ahrs_actuators.c.

#define DATALINK_C

Definition at line 32 of file demo_ahrs_actuators.c.

#define DEMO_MAX_PITCH   RadOfDeg(65)

Definition at line 63 of file demo_ahrs_actuators.c.

#define DEMO_MAX_ROLL   RadOfDeg(65)

Definition at line 59 of file demo_ahrs_actuators.c.

Referenced by main_periodic_task().

#define PERIODIC_C_MAIN

Definition at line 30 of file demo_ahrs_actuators.c.

Function Documentation

void dl_parse_msg ( void  )

Should be called when chars are available in dl_buffer.

Definition at line 145 of file demo_ahrs_actuators.c.

int main ( void  )

Definition at line 77 of file demo_ahrs_actuators.c.

References main_event_task(), main_init(), main_periodic_task(), and sys_time_check_and_ack_timer().

+ Here is the call graph for this function:

static void main_event_task ( void  )
inlinestatic

Definition at line 137 of file demo_ahrs_actuators.c.

References DatalinkEvent, ImuEvent, and mcu_event().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void main_init ( void  )
inlinestatic
static void main_periodic_task ( void  )
inlinestatic

Definition at line 118 of file demo_ahrs_actuators.c.

References commands, datalink_time, DefaultChannel, DefaultDevice, DefaultPeriodic, DEMO_MAX_ROLL, imu_periodic(), LED_PERIODIC, MAX_PPRZ, sys_time::nb_sec, PERIODIC_FREQUENCY, FloatEulers::phi, stateGetNedToBodyEulers_f(), and FloatEulers::theta.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_actuators ( struct transport_tx trans,
struct link_device dev 
)
static

Definition at line 186 of file demo_ahrs_actuators.c.

Referenced by autopilot_init(), init_fbw(), and main_init().

+ Here is the caller graph for this function:

static void send_alive ( struct transport_tx trans,
struct link_device dev 
)
static

Definition at line 174 of file demo_ahrs_actuators.c.

Referenced by main_init().

+ Here is the caller graph for this function:

void send_autopilot_version ( struct transport_tx trans,
struct link_device dev 
)
static

Definition at line 179 of file demo_ahrs_actuators.c.

Referenced by main_init().

+ Here is the caller graph for this function:

static void send_commands ( struct transport_tx trans,
struct link_device dev 
)
static

Definition at line 191 of file demo_ahrs_actuators.c.

References commands.

Referenced by init_fbw(), link_mcu_init(), and main_init().

+ Here is the caller graph for this function:

Variable Documentation

uint16_t datalink_time = 0

Definition at line 75 of file demo_ahrs_actuators.c.

Referenced by main_periodic_task().