31#include "generated/modules.h"
35#define DISCO_MAG_I2C_DEV i2c1
37#define DISCO_MPU_I2C_DEV i2c2
44#if !defined DISCO_LOWPASS_FILTER && !defined DISCO_SMPLRT_DIV
45#if PERIODIC_FREQUENCY <= 120
49#define DISCO_LOWPASS_FILTER MPU60X0_DLPF_42HZ
50#define DISCO_SMPLRT_DIV 9
53#elif PERIODIC_FREQUENCY < 500
57#define DISCO_LOWPASS_FILTER MPU60X0_DLPF_98HZ
58#define DISCO_SMPLRT_DIV 1
65#define DISCO_LOWPASS_FILTER MPU60X0_DLPF_256HZ
66#define DISCO_SMPLRT_DIV 3
145 AbiSendMsgIMU_ACCEL_RAW(
IMU_BOARD_ID, now_ts, &accel, 1, IMU_DISCO_PERIODIC_FREQ,
imu_disco.mpu.temp);
Main include for ABI (AirBorneInterface).
void ak8963_event(struct Ak8963 *ak)
void ak8963_init(struct Ak8963 *ak, struct i2c_periph *i2c_p, uint8_t addr)
Initialize AK8963 struct.
static void ak8963_periodic(struct Ak8963 *ak)
convenience function: read or start configuration if not already initialized
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
#define RATES_ASSIGN(_ra, _p, _q, _r)
#define VECT3_ASSIGN(_a, _x, _y, _z)
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
void imu_set_defaults_gyro(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Rates *neutral, const struct FloatRates *scale_f)
Set the defaults for a gyro sensor WARNING: Should be called before sensor is publishing messages to ...
void imu_set_defaults_accel(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Vect3 *neutral, const struct FloatVect3 *scale_f)
Set the defaults for a accel sensor WARNING: Should be called before sensor is publishing messages to...
Inertial Measurement Unit interface.
void imu_disco_periodic(void)
Handle all the periodic tasks of the Disco IMU components.
#define DISCO_LOWPASS_FILTER
struct ImuDisco imu_disco
Disco IMU data.
#define DISCO_MPU_I2C_DEV
void imu_disco_init(void)
Disco IMU initializtion of the MPU-60x0 and HMC58xx.
#define DISCO_MAG_I2C_DEV
void imu_disco_event(void)
Handle all the events of the Disco IMU components.
Interface for the Disco magnetometer, accelerometer and gyroscope.
#define DISCO_ACCEL_RANGE
Everything that is in the disco IMU.
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
const struct FloatVect3 MPU60X0_ACCEL_SENS_F[4]
const struct FloatRates MPU60X0_GYRO_SENS_F[4]
void mpu60x0_i2c_init(struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
void mpu60x0_i2c_event(struct Mpu60x0_I2c *mpu)
static void mpu60x0_i2c_periodic(struct Mpu60x0_I2c *mpu)
convenience function: read or start configuration if not already initialized
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.