35 #include "generated/modules.h"
39 #include "pprzlink/messages.h"
42 #ifndef IMU_APOGEE_CHAN_X
43 #define IMU_APOGEE_CHAN_X 0
45 #ifndef IMU_APOGEE_CHAN_Y
46 #define IMU_APOGEE_CHAN_Y 1
48 #ifndef IMU_APOGEE_CHAN_Z
49 #define IMU_APOGEE_CHAN_Z 2
52 #if !defined APOGEE_LOWPASS_FILTER && !defined APOGEE_SMPLRT_DIV
53 #define APOGEE_LOWPASS_FILTER MPU60X0_DLPF_42HZ
54 #define APOGEE_SMPLRT_DIV 9
63 #if APOGEE_USE_MPU9150
68 #ifndef APOGEE_MAG_FREQ
69 #define APOGEE_MAG_FREQ 50
74 #define MAG_PRESCALER Max(1,((PERIODIC_FREQUENCY)/APOGEE_MAG_FREQ))
79 bool configure_mag_slave(
Mpu60x0ConfigSet mpu_set __attribute__((unused)),
void *mpu __attribute__((unused)))
113 #if APOGEE_USE_MPU9150
126 #if APOGEE_USE_MPU9150
154 #if APOGEE_USE_MPU9150
Main include for ABI (AirBorneInterface).
void ak8975_init(struct Ak8975 *ak, struct i2c_periph *i2c_p, uint8_t addr)
void ak8975_event(struct Ak8975 *ak)
#define AK8975_I2C_SLV_ADDR
static void ak8975_periodic(struct Ak8975 *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.
Common code for AP and FBW telemetry.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
void imu_set_defaults_accel(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Vect3 *neutral, const struct Int32Vect3 *scale)
Set the defaults for a accel sensor WARNING: Should be called before sensor is publishing messages to...
void imu_set_defaults_gyro(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Rates *neutral, const struct Int32Rates *scale)
Set the defaults for a gyro sensor WARNING: Should be called before sensor is publishing messages to ...
struct ImuApogee imu_apogee
#define APOGEE_SMPLRT_DIV
#define IMU_APOGEE_CHAN_X
void imu_apogee_periodic(void)
bool configure_baro_slave(Mpu60x0ConfigSet mpu_set, void *mpu)
void imu_apogee_init(void)
void imu_apogee_event(void)
#define IMU_APOGEE_CHAN_Z
#define APOGEE_LOWPASS_FILTER
#define IMU_APOGEE_CHAN_Y
Driver for the IMU on the Apogee board.
#define APOGEE_GYRO_RANGE
#define APOGEE_ACCEL_RANGE
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
arch independent LED (Light Emitting Diodes) API
const struct Int32Rates MPU60X0_GYRO_SENS_FRAC[4][2]
const struct Int32Vect3 MPU60X0_ACCEL_SENS_FRAC[4][2]
Mpu60x0I2cSlaveConfigure configure
uint8_t smplrt_div
Sample rate divider.
uint8_t nb_slaves
number of used I2C slaves
struct Mpu60x0I2cSlave slaves[MPU60X0_I2C_NB_SLAVES]
I2C slaves.
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
bool i2c_bypass
Bypass MPU I2C.
enum Mpu60x0AccelRanges accel_range
g Range
void(* Mpu60x0ConfigSet)(void *mpu, uint8_t _reg, uint8_t _val)
Configuration function prototype.
enum Mpu60x0GyroRanges gyro_range
deg/s Range
void mpu60x0_i2c_init(struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
void mpu60x0_i2c_event(struct Mpu60x0_I2c *mpu)
union Mpu60x0_I2c::@341 data_accel
volatile bool data_available
data ready flag
static void mpu60x0_i2c_periodic(struct Mpu60x0_I2c *mpu)
convenience function: read or start configuration if not already initialized
union Mpu60x0_I2c::@342 data_rates
float temp
temperature in degrees Celcius
struct Mpu60x0Config config
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
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.