Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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 "modules/gps/gps.h"
#include "modules/ahrs/ahrs.h"
#include "generated/airframe.h"
#include "modules/ins/ins_module.h"
#include "modules/ins/imu_chimu.h"
#include "modules/ahrs/ahrs_chimu.h"
#include "led.h"
#include "modules/core/abi.h"
+ Include dependency graph for ahrs_chimu_spi.c:

Go to the source code of this file.

Macros

#define AHRS_CHIMU_GPS_ID   GPS_MULTI_ID
 ABI binding for gps data. More...
 

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 ahrs_chimu_enable_output (bool 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
 

Macro Definition Documentation

◆ AHRS_CHIMU_GPS_ID

#define AHRS_CHIMU_GPS_ID   GPS_MULTI_ID

ABI binding for gps data.

Used for GPS ABI messages.

Definition at line 47 of file ahrs_chimu_spi.c.

Function Documentation

◆ ahrs_chimu_enable_output()

static bool ahrs_chimu_enable_output ( bool  enable)
static

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

◆ ahrs_chimu_init()

void ahrs_chimu_init ( void  )

Definition at line 71 of file ahrs_chimu_spi.c.

Referenced by ahrs_chimu_register().

+ Here is the caller graph for this function:

◆ ahrs_chimu_register()

void ahrs_chimu_register ( void  )

Definition at line 64 of file ahrs_chimu_spi.c.

◆ ahrs_chimu_update_gps()

void ahrs_chimu_update_gps ( uint8_t  gps_fix,
uint16_t  gps_speed_3d 
)

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

◆ gps_cb()

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

Definition at line 51 of file ahrs_chimu_spi.c.

References ahrs_chimu_update_gps().

Referenced by ahrs_chimu_register().

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

◆ parse_ins_msg()

Variable Documentation

◆ ahrs_chimu

struct AhrsChimu ahrs_chimu

Definition at line 36 of file ahrs_chimu_spi.c.

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

◆ CHIMU_DATA

CHIMU_PARSER_DATA CHIMU_DATA

Definition at line 33 of file ahrs_chimu_spi.c.

Referenced by ahrs_chimu_init(), and parse_ins_msg().

◆ gps_ev

abi_event gps_ev
static

Definition at line 50 of file ahrs_chimu_spi.c.

Referenced by ahrs_chimu_register().

◆ ins_pitch_neutral

INS_FORMAT ins_pitch_neutral

Definition at line 36 of file ahrs_chimu_spi.c.

Referenced by ahrs_chimu_init().

◆ ins_roll_neutral

INS_FORMAT ins_roll_neutral

Definition at line 35 of file ahrs_chimu_spi.c.

Referenced by ahrs_chimu_init().