Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
demo_ahrs_actuators.c File Reference

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

#include <inttypes.h>
#include "modules/datalink/telemetry.h"
#include "modules/datalink/datalink.h"
#include "modules/datalink/downlink.h"
#include "modules/core/abi.h"
#include "generated/airframe.h"
#include "generated/settings.h"
#include "generated/modules.h"
#include "std.h"
#include "mcu.h"
#include "mcu_periph/sys_time.h"
#include "led.h"
#include "state.h"
#include "modules/imu/imu.h"
#include "modules/ahrs/ahrs.h"
#include "modules/core/commands.h"
#include "modules/actuators/actuators.h"
#include "modules/core/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 MODULES_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)
 

Detailed Description

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

Definition in file demo_ahrs_actuators.c.

Macro Definition Documentation

◆ ABI_C

#define ABI_C

Definition at line 31 of file demo_ahrs_actuators.c.

◆ DEMO_MAX_PITCH

#define DEMO_MAX_PITCH   RadOfDeg(65)

Definition at line 63 of file demo_ahrs_actuators.c.

◆ DEMO_MAX_ROLL

#define DEMO_MAX_ROLL   RadOfDeg(65)

Definition at line 59 of file demo_ahrs_actuators.c.

◆ MODULES_C

#define MODULES_C

Definition at line 32 of file demo_ahrs_actuators.c.

◆ PERIODIC_C_MAIN

#define PERIODIC_C_MAIN

Definition at line 30 of file demo_ahrs_actuators.c.

Function Documentation

◆ main()

int main ( void  )

Definition at line 75 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:

◆ main_event_task()

static void main_event_task ( void  )
inlinestatic

Definition at line 133 of file demo_ahrs_actuators.c.

References mcu_event().

Referenced by main().

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

◆ main_init()

static void main_init ( void  )
inlinestatic

Definition at line 87 of file demo_ahrs_actuators.c.

References actuators_init(), ahrs_init(), DefaultPeriodic, downlink_init(), mcu_init(), register_periodic_telemetry(), send_actuators(), send_alive(), send_autopilot_version(), send_commands(), settings_init(), stateInit(), and sys_time_register_timer().

Referenced by main().

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

◆ main_periodic_task()

static void main_periodic_task ( void  )
inlinestatic

Definition at line 112 of file demo_ahrs_actuators.c.

References commands, datalink_periodic(), DefaultChannel, DefaultDevice, DefaultPeriodic, DEMO_MAX_ROLL, LED_PERIODIC, MAX_PPRZ, sys_time::nb_sec, 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:

◆ send_actuators()

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

Definition at line 151 of file demo_ahrs_actuators.c.

References dev.

Referenced by main_init().

+ Here is the caller graph for this function:

◆ send_alive()

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

Definition at line 139 of file demo_ahrs_actuators.c.

References dev.

Referenced by main_init().

+ Here is the caller graph for this function:

◆ send_autopilot_version()

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

Definition at line 144 of file demo_ahrs_actuators.c.

References dev.

Referenced by main_init().

+ Here is the caller graph for this function:

◆ send_commands()

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

Definition at line 156 of file demo_ahrs_actuators.c.

References commands, and dev.

Referenced by main_init().

+ Here is the caller graph for this function: