32 #include "generated/modules.h"
61 #if !IMU_PX4_DISABLE_MAG
72 #if !IMU_PX4_DISABLE_MAG
94 AbiSendMsgIMU_GYRO_RAW(
IMU_PX4_ID, now_ts, &gyro, 1, IMU_PX4_PERIODIC_FREQ, NAN);
102 AbiSendMsgIMU_ACCEL_RAW(
IMU_PX4_ID, now_ts, &accel, 1, IMU_PX4_PERIODIC_FREQ, NAN);
105 #if !IMU_PX4_DISABLE_MAG
113 AbiSendMsgIMU_MAG_RAW(
IMU_PX4_ID, now_ts, &mag);
Main include for ABI (AirBorneInterface).
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
#define VECT3_ASSIGN(_a, _x, _y, _z)
#define VECT3_COPY(_a, _b)
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 ...
Inertial Measurement Unit interface.
void imu_px4_periodic(void)
Driver for pixhawk IMU's.
struct Lsm303d_Spi lsm_acc
struct Lsm303d_Spi lsm_mag
#define L3GD20_SENS_2000_DEN
#define L3GD20_SENS_2000_NUM
default gyro sensitivy and neutral from the datasheet L3GD20 has 70e-3 LSB/(deg/s) at 2000deg/s range...
void l3gd20_spi_event(struct L3gd20_Spi *l3g)
void l3gd20_spi_init(struct L3gd20_Spi *l3g, struct spi_periph *spi_p, uint8_t slave_idx)
union L3gd20_Spi::@331 data_rates
static void l3gd20_spi_periodic(struct L3gd20_Spi *l3g)
convenience function: read or start configuration if not already initialized
volatile bool data_available
data ready flag
#define LSM303D_ACCEL_SENS_16G_NUM
default accel sensitivy from the datasheet LSM303DLHC has 732 LSB/g fixed point sens: 9....
#define LSM303D_ACCEL_SENS_16G_DEN
void lsm303d_spi_event(struct Lsm303d_Spi *lsm)
void lsm303d_spi_init(struct Lsm303d_Spi *lsm, struct spi_periph *spi_p, uint8_t slave_idx, enum Lsm303dTarget target)
static void lsm303d_spi_periodic(struct Lsm303d_Spi *lsm)
convenience function: read or start configuration if not already initialized
union Lsm303d_Spi::@335 data_mag
volatile bool data_available_acc
data ready flag accelero
volatile bool data_available_mag
data ready flag magneto
union Lsm303d_Spi::@334 data_accel
static const struct Int32Rates gyro_scale[2]
Default gyro scale.
static const struct Int32Vect3 accel_scale[2]
Default accel scale/neutral.
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
Architecture independent SPI (Serial Peripheral Interface) API.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.