Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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!

1 <module name="gps_ublox"/>
2 <module name="gps_ubx_i2c">
3  <configure name="GPS_UBX_I2C_DEV" value="i2cX" />
4 </module>

Module configuration options

Configure Options

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

Auto-loaded modules

The following modules are automatically loaded (just as if you had added them in the airframe file)


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.


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">
U-blox GPS (I2C)
Extends the gps_ublox to provide I2C connectivity.
<configure name="GPS_UBX_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c1)"/>
<autoload name="gps_ublox"/>
<file name="gps_ubx_i2c.h"/>
<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"/>