Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
airspeed_ets module

Airspeed ETS (I2C).

Driver for the EagleTree Systems Airspeed Sensor. Has only been tested with V3 of the sensor hardware.

Notes: Connect directly to TWOG/Tiny/Lisa I2C port. Multiple sensors can be chained together. Sensor may be in the proprietary mode (default) or in 3rd-party mode. In 3rd-party mode you must define AIRSPEED_ETS_3RD_PARTY_MODE. A eLogger is needed to set sensor to 3rd-party mode, which is supposed to be more reliable than the default mode.

Sensor module wire assignments:

  • Red wire: 5V
  • White wire: Ground
  • Yellow wire: SDA
  • Brown wire: SCL

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="airspeed_ets">
2  <define name="AIRSPEED_ETS_OFFSET" value="offset" />
3  <define name="AIRSPEED_ETS_SCALE" value="scale" />
4  <define name="AIRSPEED_ETS_START_DELAY" value="delay" />
5  <define name="AIRSPEED_ETS_SYNC_SEND" />
6  <define name="USE_AIRSPEED_ETS" value="TRUE|FALSE" />
7  <define name="AIRSPEED_ETS_3RD_PARTY_MODE" />
8  <define name="AIRSPEED_ETS_SDLOG" value="TRUE|FALSE" />
9  <configure name="AIRSPEED_ETS_I2C_DEV" value="i2cX" />
10 </module>

Module configuration options

Configure Options

  • name: AIRSPEED_ETS_I2C_DEV value: i2cX
    Description: set i2c peripheral (default: i2c0)

Define Options

  • name: AIRSPEED_ETS_OFFSET value: offset
    Description: sensor reading offset for sensor in proprietary mode (default: 0)
  • name: AIRSPEED_ETS_SCALE value: scale
    Description: sensor scale factor for sensor in proprietary mode (default: 1.8)
  • name: AIRSPEED_ETS_START_DELAY value: delay
    Description: set initial start delay in seconds
  • name: AIRSPEED_ETS_SYNC_SEND value: None
    Description: flag to transmit the data as it is acquired
  • name: USE_AIRSPEED_ETS value: TRUE|FALSE
    Description: set airspeed in state interface
  • name: AIRSPEED_ETS_3RD_PARTY_MODE value: None
    Description: read raw value for sensor in third-party mode
  • name: AIRSPEED_ETS_SDLOG value: TRUE|FALSE
    Description: start logging to SD card

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 airspeed_ets.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="airspeed_ets" dir="sensors">
<doc>
<description>
Airspeed ETS (I2C).
Driver for the EagleTree Systems Airspeed Sensor.
Has only been tested with V3 of the sensor hardware.
Notes:
Connect directly to TWOG/Tiny/Lisa I2C port. Multiple sensors can be chained together.
Sensor may be in the proprietary mode (default) or in 3rd-party mode. In 3rd-party mode you must define AIRSPEED_ETS_3RD_PARTY_MODE.
A eLogger is needed to set sensor to 3rd-party mode, which is supposed to be more reliable than the default mode.
Sensor module wire assignments:
- Red wire: 5V
- White wire: Ground
- Yellow wire: SDA
- Brown wire: SCL
</description>
<configure name="AIRSPEED_ETS_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c0)"/>
<define name="AIRSPEED_ETS_OFFSET" value="offset" description="sensor reading offset for sensor in proprietary mode (default: 0)"/>
<define name="AIRSPEED_ETS_SCALE" value="scale" description="sensor scale factor for sensor in proprietary mode (default: 1.8)"/>
<define name="AIRSPEED_ETS_START_DELAY" value="delay" description="set initial start delay in seconds"/>
<define name="AIRSPEED_ETS_SYNC_SEND" description="flag to transmit the data as it is acquired"/>
<define name="USE_AIRSPEED_ETS" value="TRUE|FALSE" description="set airspeed in state interface"/>
<define name="AIRSPEED_ETS_3RD_PARTY_MODE" description="read raw value for sensor in third-party mode"/>
<define name="AIRSPEED_ETS_SDLOG" value="TRUE|FALSE" description="start logging to SD card"/>
</doc>
<header>
<file name="airspeed_ets.h"/>
</header>
<init fun="airspeed_ets_init()"/>
<periodic fun="airspeed_ets_read_periodic()" freq="10."/>
<event fun="AirspeedEtsEvent()"/>
<makefile>
<configure name="AIRSPEED_ETS_I2C_DEV" default="i2c0" case="upper|lower"/>
<define name="USE_$(AIRSPEED_ETS_I2C_DEV_UPPER)"/>
<define name="AIRSPEED_ETS_I2C_DEV" value="$(AIRSPEED_ETS_I2C_DEV_LOWER)"/>
<file name="airspeed_ets.c"/>
</makefile>
</module>