29 #include "pprzlink/messages.h"
31 #include "generated/airframe.h"
34 #ifndef LIS3MDL_CHAN_X
35 #define LIS3MDL_CHAN_X 0
37 #ifndef LIS3MDL_CHAN_Y
38 #define LIS3MDL_CHAN_Y 1
40 #ifndef LIS3MDL_CHAN_Z
41 #define LIS3MDL_CHAN_Z 2
43 #ifndef LIS3MDL_CHAN_X_SIGN
44 #define LIS3MDL_CHAN_X_SIGN +
46 #ifndef LIS3MDL_CHAN_Y_SIGN
47 #define LIS3MDL_CHAN_Y_SIGN +
49 #ifndef LIS3MDL_CHAN_Z_SIGN
50 #define LIS3MDL_CHAN_Z_SIGN +
63 #if MODULE_LIS3MDL_UPDATE_AHRS && defined(LIS3MDL_MAG_TO_IMU_PHI) && defined(LIS3MDL_MAG_TO_IMU_THETA) && defined(LIS3MDL_MAG_TO_IMU_PSI)
86 #if MODULE_LIS3MDL_UPDATE_AHRS
99 #if MODULE_LIS3MDL_SYNC_SEND
102 #if MODULE_LIS3MDL_UPDATE_AHRS || MODULE_LIS3MDL_SYNC_SEND
Main include for ABI (AirBorneInterface).
#define MAG_LIS3MDL_SENDER_ID
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Common code for AP and FBW telemetry.
#define ANGLE_BFP_OF_REAL(_af)
#define int32_rmat_of_eulers
Rotation matrix from Euler angles.
void imu_set_defaults_mag(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Vect3 *neutral, const struct Int32Vect3 *scale)
Set the defaults for a mag sensor WARNING: Should be called before sensor is publishing messages to e...
void lis3mdl_init(struct Lis3mdl *mag, struct i2c_periph *i2c_p, uint8_t addr, uint8_t data_rate, uint8_t scale, uint8_t mode, uint8_t perf)
void lis3mdl_event(struct Lis3mdl *mag)
volatile bool data_available
data ready flag
static void lis3mdl_periodic(struct Lis3mdl *mag)
convenience function: read or start configuration if not already initialized
#define LIS3MDL_PERFORMANCE_ULTRA_HIGH
#define LIS3MDL_DATA_RATE_80_HZ
#define LIS3MDL_SCALE_4_GAUSS
#define LIS3MDL_MODE_CONTINUOUS
struct Lis3mdl mag_lis3mdl
#define LIS3MDL_CHAN_Y_SIGN
void mag_lis3mdl_module_init(void)
#define LIS3MDL_CHAN_X_SIGN
void mag_lis3mdl_module_event(void)
#define LIS3MDL_CHAN_Z_SIGN
void mag_lis3mdl_report(void)
void mag_lis3mdl_module_periodic(void)
Module wrapper for ST LIS3MDL 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.