Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mag_pitot_uart.c File Reference
#include "modules/sensors/mag_pitot_uart.h"
#include "pprzlink/pprz_transport.h"
#include "pprzlink/intermcu_msg.h"
#include "mcu_periph/uart.h"
#include "subsystems/abi.h"
#include "subsystems/imu.h"
#include "state.h"
#include "subsystems/datalink/telemetry.h"
+ Include dependency graph for mag_pitot_uart.c:

Go to the source code of this file.

Functions

static void mag_pitot_raw_downlink (struct transport_tx *trans, struct link_device *dev)
 
void mag_pitot_init ()
 
static void mag_pitot_parse_msg (void)
 
void mag_pitot_event ()
 

Variables

static struct mag_pitot_t mag_pitot
 
static uint8_t mp_msg_buf [128]
 The message buffer for the Magneto and pitot. More...
 

Detailed Description

Author
C. De Wagter Remotely located magnetometer and pitot tube over uart (RS232) communication

Definition in file mag_pitot_uart.c.

Function Documentation

void mag_pitot_event ( void  )

Definition at line 121 of file mag_pitot_uart.c.

References mag_pitot_t::device, mag_pitot_parse_msg(), mp_msg_buf, mag_pitot_t::msg_available, and mag_pitot_t::transport.

+ Here is the call graph for this function:

void mag_pitot_init ( void  )
static void mag_pitot_parse_msg ( void  )
inlinestatic

Definition at line 70 of file mag_pitot_uart.c.

References get_sys_time_usec(), imu, IMU_MAG_PITOT_ID, imu_scale_mag(), mag_pitot_t::imu_to_mag, int32_rmat_vmult(), Imu::mag, Imu::mag_unscaled, mp_msg_buf, orientationGetRMat_i(), Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.

Referenced by mag_pitot_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 47 of file mag_pitot_uart.c.

References imu, Imu::mag_unscaled, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.

Referenced by mag_pitot_init().

+ Here is the caller graph for this function:

Variable Documentation

struct mag_pitot_t mag_pitot
static
Initial value:
= {
.device = (&((MAG_PITOT_PORT).device)),
.msg_available = false
}

Definition at line 37 of file mag_pitot_uart.c.

uint8_t mp_msg_buf[128]
static

The message buffer for the Magneto and pitot.

Definition at line 41 of file mag_pitot_uart.c.

Referenced by mag_pitot_event(), and mag_pitot_parse_msg().