Paparazzi UAS  v5.15_devel-50-g4d7045d
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ins_vn100 module

VectorNav VN100 (SPI)

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!

1 <module name="ins_vn100">
2  <configure name="VN100_SPI_DEV" value="spiX" />
3  <configure name="VN100_SLAVE_IDX" value="SPI_SLAVEX" />
4 </module>

Module configuration options

Configure Options

  • name: VN100_SPI_DEV value: spiX
    Description: select spi peripherals (default spi1)
  • name: VN100_SLAVE_IDX value: SPI_SLAVEX
    Description: spi slave index

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.

  • vn100_periodic_task()
    • Frequency in Hz: 60
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.
  • vn100_report_task()
    • Frequency in Hz: 4
    • 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 ins_vn100.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="vn100" dir="ins">
<doc>
<description>VectorNav VN100 (SPI)</description>
<configure name="VN100_SPI_DEV" value="spiX" description="select spi peripherals (default spi1)"/>
<configure name="VN100_SLAVE_IDX" value="SPI_SLAVEX" description="spi slave index"/>
</doc>
<!-- <conflicts>ins</conflicts> -->
<header>
<file name="ins_vn100.h"/>
</header>
<init fun="vn100_init()"/>
<periodic fun="vn100_periodic_task()" freq="60"/>
<periodic fun="vn100_report_task()" freq="4"/>
<event fun="vn100_event_task()"/>
<makefile>
<configure name="VN100_SPI_DEV" default="spi1" case="upper|lower"/>
<configure name="VN100_SLAVE_IDX" default="spi_slave0" case="upper|lower"/>
<raw>
include $(CFG_SHARED)/spi_master.makefile
</raw>
<define name="USE_$(VN100_SPI_DEV_UPPER)" />
<define name="USE_$(VN100_SLAVE_IDX_UPPER)" />
<define name="VN100_SPI_DEV" value="$(VN100_SPI_DEV_LOWER)" />
<define name="VN100_SLAVE_IDX" value="$(VN100_SLAVE_IDX_UPPER)" />
<file name="ins_vn100.c"/>
</makefile>
</module>