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

Hygrosens TEMOD-I2C-Rx temperature 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="temp_temod">
b'<define name="TEMOD_TYPE" value="type" />\n '
b'<define name="TEMOD_SDLOG" value="TRUE|FALSE" />\n '
b'<configure name="TEMOD_I2C_DEV" value="i2cX" />\n '
</module>

Module configuration options

Configure Options

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

Define Options

  • name: TEMOD_TYPE value: type
    Description: device type (default TEMOD_I2C_R1)
  • name: TEMOD_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.

  • temod_periodic()
    • Frequency in Hz: 8
    • 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 temp_temod.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="temp_temod" dir="meteo">
<doc>
<description>Hygrosens TEMOD-I2C-Rx temperature sensor</description>
<configure name="TEMOD_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
<define name="TEMOD_TYPE" value="type" description="device type (default TEMOD_I2C_R1)"/>
<define name="TEMOD_SDLOG" value="TRUE|FALSE" description="start logging to SD card"/>
</doc>
<header>
<file name="temp_temod.h"/>
</header>
<init fun="temod_init()"/>
<periodic fun="temod_periodic()" freq="8"/>
<event fun="temod_event()"/>
<makefile target="ap">
<configure name="TEMOD_I2C_DEV" default="i2c0" case="upper|lower"/>
<define name="USE_$(TEMOD_I2C_DEV_UPPER)"/>
<define name="TEMOD_I2C_DEV" value="$(TEMOD_I2C_DEV_LOWER)"/>
<file name="temp_temod.c"/>
</makefile>
</module>