Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Baro sensortechnics HCA (I2C)

Module XML file: baro_hca.xml

No detailed description...

Example for airframe file

This example contains all possible configuration options, not all of them are mandatory!

1 <modules>
2  <load name="baro_hca.xml">
3  <configure name="BARO_HCA_I2C_DEV" value="i2cX" />
4  </load>
5 </modules>

Module configuration options

Configure Options

  • name: BARO_HCA_I2C_DEV value: i2cX
    Description: select which i2c peripheral to use (default i2c0)

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_hca_read_periodic()
    • Frequency in Hz: 10.
    • 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_hca.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="baro_hca" dir="sensors">
<doc>
<description>Baro sensortechnics HCA (I2C)</description>
<configure name="BARO_HCA_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
</doc>
<header>
<file name="baro_hca.h"/>
</header>
<init fun="baro_hca_init()"/>
<periodic fun="baro_hca_read_periodic()" freq="10."/>
<event fun="BaroHcaEvent()"/>
<makefile target="ap">
<raw>
BARO_HCA_I2C_DEV ?= i2c0
BARO_HCA_I2C_DEV_LOWER=$(shell echo $(BARO_HCA_I2C_DEV) | tr A-Z a-z)
BARO_HCA_I2C_DEV_UPPER=$(shell echo $(BARO_HCA_I2C_DEV) | tr a-z A-Z)
</raw>
<define name="USE_$(BARO_HCA_I2C_DEV_UPPER)"/>
<define name="BARO_HCA_I2C_DEV" value="$(BARO_HCA_I2C_DEV_LOWER)"/>
<file name="baro_hca.c"/>
</makefile>
</module>