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
ahrs_chimu_spi.c File Reference
#include <stdbool.h>
#include "mcu_periph/spi.h"
#include "mcu_periph/spi_slave_hs_arch.h"
#include "state.h"
#include "subsystems/gps.h"
#include "subsystems/ahrs.h"
#include "generated/airframe.h"
#include "ins_module.h"
#include "imu_chimu.h"
#include "ahrs_chimu.h"
#include "led.h"
#include "subsystems/abi.h"
+ Include dependency graph for ahrs_chimu_spi.c:

Go to the source code of this file.

Functions

void ahrs_chimu_update_gps (uint8_t gps_fix, uint16_t gps_speed_3d)
 
static void gps_cb (uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
 
static bool_t ahrs_chimu_enable_output (bool_t enable)
 
void ahrs_chimu_register (void)
 
void ahrs_chimu_init (void)
 
void parse_ins_msg (void)
 

Variables

CHIMU_PARSER_DATA CHIMU_DATA
 
INS_FORMAT ins_roll_neutral
 
INS_FORMAT ins_pitch_neutral
 
struct AhrsChimu ahrs_chimu
 
static abi_event gps_ev
 

Function Documentation

static bool_t ahrs_chimu_enable_output ( bool_t  enable)
static

Definition at line 51 of file ahrs_chimu_spi.c.

References ahrs_chimu, and AhrsChimu::is_enabled.

Referenced by ahrs_chimu_register().

+ Here is the caller graph for this function:

void ahrs_chimu_init ( void  )
void ahrs_chimu_register ( void  )

Definition at line 57 of file ahrs_chimu_spi.c.

References ABI_BROADCAST, ahrs_chimu_enable_output(), ahrs_chimu_init(), ahrs_register_impl(), and gps_cb().

+ Here is the call graph for this function:

void ahrs_chimu_update_gps ( uint8_t  gps_fix,
uint16_t  gps_speed_3d 
)

Definition at line 143 of file ahrs_chimu_spi.c.

References CHIMU_Checksum(), FloatSwap, GpsFixValid, and InsSend.

Referenced by gps_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gps_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct GpsState gps_s 
)
static

Definition at line 44 of file ahrs_chimu_spi.c.

References ahrs_chimu_update_gps(), GpsState::fix, and GpsState::speed_3d.

Referenced by ahrs_chimu_register().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void parse_ins_msg ( void  )
inline

Definition at line 100 of file ahrs_chimu_spi.c.

Variable Documentation

struct AhrsChimu ahrs_chimu

Definition at line 38 of file ahrs_chimu_spi.c.

Referenced by ahrs_chimu_enable_output(), ahrs_chimu_init(), and parse_ins_msg().

CHIMU_PARSER_DATA CHIMU_DATA

Definition at line 33 of file ahrs_chimu_spi.c.

abi_event gps_ev
static

Definition at line 43 of file ahrs_chimu_spi.c.

INS_FORMAT ins_pitch_neutral

Definition at line 36 of file ahrs_chimu_spi.c.

Referenced by ahrs_chimu_init().

INS_FORMAT ins_roll_neutral

Definition at line 35 of file ahrs_chimu_spi.c.

Referenced by ahrs_chimu_init().