30 #include "pprzlink/messages.h"
32 #include "generated/airframe.h"
35 #ifndef HMC58XX_CHAN_X
36 #define HMC58XX_CHAN_X 0
38 #ifndef HMC58XX_CHAN_Y
39 #define HMC58XX_CHAN_Y 1
41 #ifndef HMC58XX_CHAN_Z
42 #define HMC58XX_CHAN_Z 2
44 #ifndef HMC58XX_CHAN_X_SIGN
45 #define HMC58XX_CHAN_X_SIGN +
47 #ifndef HMC58XX_CHAN_Y_SIGN
48 #define HMC58XX_CHAN_Y_SIGN +
50 #ifndef HMC58XX_CHAN_Z_SIGN
51 #define HMC58XX_CHAN_Z_SIGN +
54 #if MODULE_HMC58XX_UPDATE_AHRS
56 #if defined HMC58XX_MAG_TO_IMU_PHI && defined HMC58XX_MAG_TO_IMU_THETA && defined HMC58XX_MAG_TO_IMU_PSI
57 #define USE_MAG_TO_IMU 1
60 #define USE_MAG_TO_IMU 0
70 #if MODULE_HMC58XX_UPDATE_AHRS && USE_MAG_TO_IMU
90 #if MODULE_HMC58XX_UPDATE_AHRS
111 #if MODULE_HMC58XX_SYNC_SEND
114 #if MODULE_HMC58XX_UPDATE_AHRS || MODULE_HMC58XX_SYNC_SEND
Main include for ABI (AirBorneInterface).
#define MAG_HMC58XX_SENDER_ID
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Common code for AP and FBW telemetry.
#define VECT3_COPY(_a, _b)
#define ANGLE_BFP_OF_REAL(_af)
#define int32_rmat_of_eulers
Rotation matrix from Euler angles.
void int32_rmat_vmult(struct Int32Vect3 *vb, struct Int32RMat *m_a2b, struct Int32Vect3 *va)
rotate 3D vector by rotation matrix.
void hmc58xx_init(struct Hmc58xx *hmc, struct i2c_periph *i2c_p, uint8_t addr)
Initialize Hmc58xx struct and set default config options.
void hmc58xx_event(struct Hmc58xx *hmc)
static void hmc58xx_periodic(struct Hmc58xx *hmc)
convenience function: read or start configuration if not already initialized
volatile bool data_available
data ready flag
struct Hmc58xx mag_hmc58xx
void mag_hmc58xx_report(void)
void mag_hmc58xx_module_periodic(void)
#define HMC58XX_CHAN_X_SIGN
void mag_hmc58xx_module_event(void)
void mag_hmc58xx_module_init(void)
#define HMC58XX_CHAN_Y_SIGN
#define HMC58XX_CHAN_Z_SIGN
Module wrapper for Honeywell HMC5843 and HMC5883 magnetometers.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.