Paparazzi UAS  v5.15_devel-59-g8c145b7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
baro_mpl3115 module

Baro MPL3115A2 (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="baro_mpl3115">
2  <define name="BARO_MPL3115_I2C_DEV" value="i2cX" />
3  <define name="BARO_MPL3115_I2C_SLAVE_ADDR" value="0xC0" />
4  <define name="BARO_MPL3115_SENDER_ID" value="20" />
5  <define name="SENSOR_SYNC_SEND" />
6 </module>

Module configuration options

Define Options

  • name: BARO_MPL3115_I2C_DEV value: i2cX
    Description: select which i2c peripheral to use (default i2c0)
  • name: BARO_MPL3115_I2C_SLAVE_ADDR value: 0xC0
    Description: i2c address (default factory: 0xC0)
  • name: BARO_MPL3115_SENDER_ID value: 20
    Description: ABI sender id
  • name: SENSOR_SYNC_SEND value: None
    Description: flag to enable sending BARO_MPL3115 message on every new measurement

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.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw baro_mpl3115.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="baro_mpl3115" dir="sensors">
<doc>
<description>Baro MPL3115A2 (I2C)</description>
<define name="BARO_MPL3115_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
<define name="BARO_MPL3115_I2C_SLAVE_ADDR" value="0xC0" description="i2c address (default factory: 0xC0)"/>
<define name="BARO_MPL3115_SENDER_ID" value="20" description="ABI sender id"/>
<define name="SENSOR_SYNC_SEND" description="flag to enable sending BARO_MPL3115 message on every new measurement"/>
</doc>
<header>
<file name="baro_mpl3115.h"/>
</header>
<init fun="baro_mpl3115_init()"/>
<periodic fun="baro_mpl3115_read_periodic()" freq="5."/>
<event fun="baro_mpl3115_read_event()"/>
<makefile target="ap">
<file name="baro_mpl3115.c"/>
<file name="mpl3115.c" dir="peripherals"/>
</makefile>
</module>