Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
baro_bmp3 module

Bosch-Sensortech BMP3xx pressure sensor

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!

<module name="baro_bmp3">
b'<define name="BMP3_SLAVE_ADDR" value="BMP3_I2C_ADDR|BMP3_I2C_ADDR_ALT" />\n '
b'<define name="BMP3_SYNC_SEND" />\n '
b'<define name="BMP3_COMPENSATION" value="BMP3_SINGLE_PRECISION_COMPENSATION" />\n '
b'<configure name="BMP3_I2C_DEV" value="i2cX" />\n '
</module>

Module configuration options

Configure Options

  • name: BMP3_I2C_DEV value: i2cX
    Description: select which i2c peripheral to use (default i2c1)

Define Options

  • name: BMP3_SLAVE_ADDR value: BMP3_I2C_ADDR|BMP3_I2C_ADDR_ALT
    Description: i2c slave address (default BMP3_I2C_ADDR)
  • name: BMP3_SYNC_SEND value: None
    Description: flag to transmit the data as it is acquired
  • name: BMP3_COMPENSATION value: BMP3_SINGLE_PRECISION_COMPENSATION
    Description: select precision for compensation (single precision, double precision, or integer)

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.

  • baro_bmp3_periodic()
    • Frequency in Hz: 50
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw baro_bmp3.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="baro_bmp3" dir="sensors" task="sensors">
<doc>
<description>
Bosch-Sensortech BMP3xx pressure sensor
</description>
<configure name="BMP3_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c1)"/>
<define name="BMP3_SLAVE_ADDR" value="BMP3_I2C_ADDR|BMP3_I2C_ADDR_ALT" description="i2c slave address (default BMP3_I2C_ADDR)"/>
<define name="BMP3_SYNC_SEND" description="flag to transmit the data as it is acquired"/>
<define name="BMP3_COMPENSATION" value="BMP3_SINGLE_PRECISION_COMPENSATION" description="select precision for compensation (single precision, double precision, or integer)"/>
</doc>
<dep>
<depends>i2c</depends>
<provides>baro</provides>
</dep>
<header>
<file name="baro_bmp3.h"/>
</header>
<init fun="baro_bmp3_init()"/>
<periodic fun="baro_bmp3_periodic()" freq="50"/>
<event fun="baro_bmp3_event()"/>
<makefile target="ap">
<configure name="BMP3_I2C_DEV" default="i2c1" case="upper|lower"/>
<define name="USE_$(BMP3_I2C_DEV_UPPER)"/>
<define name="BMP3_I2C_DEV" value="$(BMP3_I2C_DEV_LOWER)"/>
<file name="baro_bmp3.c"/>
<file name="bmp3_i2c.c" dir="peripherals"/>
<test arch="test">
<define name="USE_I2C1"/>
<define name="BMP3_I2C_DEV" value="i2c1"/>
</test>
</makefile>
</module>