Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Sonar ADC (INS bindings)

Module XML file: sonar_adc_ins.xml

Sonar ADC driver with INS binding, wich oes the same than sonar_adc module with an event function to feed INS subsystem. Even if SONAR_OFFSET and _SCALE can be set, currently only the raw value and the INS_SONAR_SENS will be used in ins filters.

Module configuration options

Configure Options

  • name: ADC_SONAR value: ADC_X
    Description: select ADC to use with the sonar

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.

  • sonar_adc_read()
    • 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 sonar_adc_ins.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="sonar">
<doc>
<description>
Sonar ADC (INS bindings).
Sonar ADC driver with INS binding, wich oes the same than sonar_adc module with an event function to feed INS subsystem.
Even if SONAR_OFFSET and _SCALE can be set, currently only the raw value and the INS_SONAR_SENS will be used in ins filters.
</description>
<configure name="ADC_SONAR" value="ADC_X" description="select ADC to use with the sonar"/>
</doc>
<header>
<file name="sonar_adc.h"/>
<file name="ins.h" dir="subsystems"/>
</header>
<init fun="sonar_adc_init()"/>
<periodic fun="sonar_adc_read()" freq="10"/>
<event fun="SonarEvent(ins_update_sonar)"/>
<makefile>
<file name="sonar_adc.c"/>
</makefile>
<makefile target="ap">
<define name="ADC_CHANNEL_SONAR" value="$(ADC_SONAR)"/>
<define name="USE_$(ADC_SONAR)"/>
<define name="USE_SONAR"/>
</makefile>
</module>