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

U-blox GPS (I2C)

Extends the gps_ublox to provide I2C connectivity.

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="gps_ubx_i2c">
b'<configure name="GPS_UBX_I2C_DEV" value="i2cX" />\n '
</module>

Module configuration options

Configure Options

  • name: GPS_UBX_I2C_DEV value: i2cX
    Description: set i2c peripheral (default: i2c1)

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.

  • gps_ubx_i2c_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 gps_ubx_i2c.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps_ubx_i2c" dir="gps" task="sensors">
<doc>
<description>
U-blox GPS (I2C)
Extends the gps_ublox to provide I2C connectivity.
</description>
<configure name="GPS_UBX_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c1)"/>
</doc>
<dep>
<depends>i2c,gps_ublox</depends>
<provides>gps</provides>
</dep>
<header>
<file name="gps_ubx_i2c.h"/>
</header>
<init fun="gps_ubx_i2c_init()"/>
<periodic fun="gps_ubx_i2c_periodic()" freq="10."/>
<event fun="GpsUbxi2cEvent()"/>
<makefile target="ap|fbw">
<configure name="GPS_UBX_I2C_DEV" default="i2c1" case="upper|lower"/>
<define name="USE_$(GPS_UBX_I2C_DEV_UPPER)"/>
<define name="GPS_UBX_I2C_DEV" value="$(GPS_UBX_I2C_DEV_LOWER)"/>
<configure name="UBX_GPS_PORT" value="GPS_I2C"/>
<define name="GPS_I2C"/>
<define name="I2C_BUF_LEN" value="255"/>
<file name="gps_ubx_i2c.c"/>
<test>
<!--define name="PRIMARY_GPS" value="GPS_UBX"/-->
<define name="GPS_UBX_I2C_DEV" value="i2c1"/>
<define name="USE_I2C1"/>
<define name="GPS_I2C"/>
<define name="UBX_GPS_PORT" value="GPS_I2C"/>
<define name="I2C_BUF_LEN" value="255"/>
</test>
</makefile>
</module>