Paparazzi UAS  v5.18.0_stable-1-g6993852-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu_bmi088_i2c module

IMU with BMI088 via I2C.

No detailed description...

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="imu_bmi088_i2c">
2  <define name="IMU_BMI088_GYRO_RANGE" value="BMI088_GYRO_RANGE_1000" />
3  <define name="IMU_BMI088_GYRO_ODR" value="BMI088_GYRO_ODR_400_BW_47" />
4  <define name="IMU_BMI088_GYRO_I2C_ADDR" value="BMI088_GYRO_ADDR|BMI088_GYRO_ADDR_ALT" />
5  <define name="IMU_BMI088_ACCEL_RANGE" value="BMI088_ACCEL_RANGE_6G" />
6  <define name="IMU_BMI088_ACCEL_ODR" value="BMI088_ACCEL_ODR_400" />
7  <define name="IMU_BMI088_ACCEL_I2C_ADDR" value="BMI088_ACCEL_ADDR|BMI088_ACCEL_ADDR_ALT" />
8  <define name="IMU_BMI088_CHAN_X" value="0" />
9  <define name="IMU_BMI088_CHAN_Y" value="1" />
10  <define name="IMU_BMI088_CHAN_Z" value="2" />
11  <configure name="IMU_BMI088_I2C_DEV" value="i2c3" />
12 </module>

Module configuration options

Configure Options

  • name: IMU_BMI088_I2C_DEV value: i2c3
    Description: I2C device to use for BMI088

Define Options

  • name: IMU_BMI088_GYRO_RANGE value: BMI088_GYRO_RANGE_1000
    Description: gyroscope range setting
  • name: IMU_BMI088_GYRO_ODR value: BMI088_GYRO_ODR_400_BW_47
    Description: gyroscope output data rate
    Description: I2C address of the gyro
  • name: IMU_BMI088_ACCEL_RANGE value: BMI088_ACCEL_RANGE_6G
    Description: accelerometer range setting
  • name: IMU_BMI088_ACCEL_ODR value: BMI088_ACCEL_ODR_400
    Description: accelerometer output data rate
    Description: I2C address of the accelerometer
  • name: IMU_BMI088_CHAN_X value: 0
    Description: channel index
  • name: IMU_BMI088_CHAN_Y value: 1
    Description: channel index
  • name: IMU_BMI088_CHAN_Z value: 2
    Description: channel index

Auto-loaded modules

The following modules are automatically loaded (just as if you had added them in the airframe file)

Module functions

Init Functions

These initialization functions are called once on startup.

Event Functions

These event functions are called in each cycle of the module event loop.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

  • imu_bmi088_periodic()
    • Running at maximum module frequency.
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.


Header Files

The following headers are automatically included in modules.h

Source Files

Raw imu_bmi088_i2c.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="imu_bmi088_i2c" dir="imu">
IMU with BMI088 via I2C.
<configure name="IMU_BMI088_I2C_DEV" value="i2c3" description="I2C device to use for BMI088"/>
<define name="IMU_BMI088_GYRO_RANGE" value="BMI088_GYRO_RANGE_1000" description="gyroscope range setting"/>
<define name="IMU_BMI088_GYRO_ODR" value="BMI088_GYRO_ODR_400_BW_47" description="gyroscope output data rate"/>
<define name="IMU_BMI088_GYRO_I2C_ADDR" value="BMI088_GYRO_ADDR|BMI088_GYRO_ADDR_ALT" description="I2C address of the gyro"/>
<define name="IMU_BMI088_ACCEL_RANGE" value="BMI088_ACCEL_RANGE_6G" description="accelerometer range setting"/>
<define name="IMU_BMI088_ACCEL_ODR" value="BMI088_ACCEL_ODR_400" description="accelerometer output data rate"/>
<define name="IMU_BMI088_ACCEL_I2C_ADDR" value="BMI088_ACCEL_ADDR|BMI088_ACCEL_ADDR_ALT" description="I2C address of the accelerometer"/>
<define name="IMU_BMI088_CHAN_X" value="0" description="channel index"/>
<define name="IMU_BMI088_CHAN_Y" value="1" description="channel index"/>
<define name="IMU_BMI088_CHAN_Z" value="2" description="channel index"/>
<autoload name="imu_common"/>
<autoload name="imu_nps"/>
<file name="imu_bmi088_i2c.h"/>
<init fun="imu_bmi088_init()"/>
<periodic fun="imu_bmi088_periodic()"/>
<event fun="imu_bmi088_event()"/>
<makefile target="!sim|nps|fbw">
<configure name="IMU_BMI088_I2C_DEV" default="i2c3" case="lower|upper"/>
<define name="IMU_BMI088_I2C_DEV" value="$(IMU_BMI088_I2C_DEV_LOWER)"/>
<define name="USE_$(IMU_BMI088_I2C_DEV_UPPER)"/>
<define name="IMU_TYPE_H" value="modules/imu/imu_bmi088_i2c.h" type="string"/>
<file name="bmi088.c" dir="peripherals"/>
<file name="bmi088_i2c.c" dir="peripherals"/>
<file name="imu_bmi088_i2c.c"/>
<define name="IMU_TYPE_H" value="modules/imu/imu_bmi088_i2c.h" type="string"/>
<define name="USE_I2C1"/>
<define name="IMU_BMI088_I2C_DEV" value="i2c1"/>
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart0"/>
<define name="USE_UART0"/>