10 #include "mcu_periph/spi_slave_hs_arch.h"
19 #include "generated/airframe.h"
21 #if CHIMU_DOWNLINK_IMMEDIATE
23 #include "pprzlink/messages.h"
46 #ifndef AHRS_CHIMU_GPS_ID
47 #define AHRS_CHIMU_GPS_ID GPS_MULTI_ID
52 uint32_t stamp __attribute__((unused)),
77 uint8_t rate[12] = {
CHIMU_STX,
CHIMU_STX, 0x06,
CHIMU_BROADCAST,
MSG10_UARTSETTINGS, 0x05, 0xff, 0x79, 0x00, 0x00, 0x01, 0x76 };
110 while (
dev->char_available(
dev->periph)) {
140 #if CHIMU_DOWNLINK_IMMEDIATE
153 uint8_t centripedal[19] = {0xae, 0xae, 0x0d, 0xaa, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2 };
158 gps_speed = gps_speed_3d / 100.;
162 memmove(¢ripedal[6], &gps_speed, 4);
Main include for ABI (AirBorneInterface).
Event structure to store callbacks in a linked list.
void ahrs_register_impl(AhrsEnableOutput enable)
Register an AHRS implementation.
Dispatcher to register actual AHRS implementations.
INS_FORMAT ins_pitch_neutral
static void gps_cb(uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
void ahrs_chimu_register(void)
INS_FORMAT ins_roll_neutral
void ahrs_chimu_update_gps(uint8_t gps_fix, uint16_t gps_speed_3d)
void ahrs_chimu_init(void)
#define AHRS_CHIMU_GPS_ID
ABI binding for gps data.
struct AhrsChimu ahrs_chimu
CHIMU_PARSER_DATA CHIMU_DATA
static bool ahrs_chimu_enable_output(bool enable)
#define INS_PITCH_NEUTRAL_DEFAULT
#define INS_ROLL_NEUTRAL_DEFAULT
Common code for AP and FBW telemetry.
Device independent GPS code (interface)
data structure for GPS information
static void stateSetNedToBodyEulers_f(struct FloatEulers *ned_to_body_eulers)
Set vehicle body attitude from euler angles (float).
static void stateSetBodyRates_f(struct FloatRates *body_rate)
Set vehicle body angular rate (float).
void CHIMU_Checksum(unsigned char *data, unsigned char buflen)
unsigned char CHIMU_Parse(unsigned char btData, unsigned char bInputType, CHIMU_PARSER_DATA *pstData)
void CHIMU_Init(CHIMU_PARSER_DATA *pstData)
CHIMU_attitude_data m_attitude
CHIMU_attitude_data m_attrates
CHIMU_sensor_data m_sensor
#define MSG10_UARTSETTINGS
#define CHIMU_Msg_3_IMU_Attitude
Device independent INS code.
volatile uint8_t new_ins_attitude
#define InsSend(_dat, _len)
arch independent LED (Light Emitting Diodes) API
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
Architecture independent SPI (Serial Peripheral Interface) API.
API to get/set the generic vehicle states.
static const struct usb_device_descriptor dev
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.