Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Infrared sensor using ADC

Module XML file: infrared_adc.xml

No detailed description...

Module configuration options

Configure Options

  • name: ADC_IR1 value: ADC_1
    Description: ADC for IR horizontal channel 1
  • name: ADC_IR2 value: ADC_2
    Description: ADC for IR horizontal channel 2
  • name: ADC_IR_TOP value: ADC_0
    Description: ADC for IR vertical channel
  • name: ADC_IR_NB_SAMPLES value: 16
    Description: number of samples

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

  • infrared_adc_update()
    • Frequency in Hz: 60.
    • 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 infrared_adc.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="ir_adc" dir="sensors">
<doc>
<description>Infrared sensor using ADC</description>
<configure name="ADC_IR1" value="ADC_1" description="ADC for IR horizontal channel 1"/>
<configure name="ADC_IR2" value="ADC_2" description="ADC for IR horizontal channel 2"/>
<configure name="ADC_IR_TOP" value="ADC_0" description="ADC for IR vertical channel"/>
<configure name="ADC_IR_NB_SAMPLES" value="16" description="number of samples"/>
</doc>
<header>
<file name="infrared_adc.h"/>
</header>
<init fun="infrared_adc_init()"/>
<periodic fun="infrared_adc_update()" freq="60."/>
<makefile target="ap|sim|jsbsim">
<define name="USE_INFRARED_TELEMETRY"/>
<file name="infrared.c" dir="subsystems/sensors"/>
<file name="infrared_adc.c" dir="subsystems/sensors"/>
</makefile>
<makefile target="ap">
<raw>
ADC_IR_TOP ?= ADC_0
ADC_IR1 ?= ADC_1
ADC_IR2 ?= ADC_2
ADC_IR_NB_SAMPLES ?= 16
ap.CFLAGS += -DADC_CHANNEL_IR1=$(ADC_IR1) -DUSE_$(ADC_IR1)
ap.CFLAGS += -DADC_CHANNEL_IR2=$(ADC_IR2) -DUSE_$(ADC_IR2)
ap.CFLAGS += -DADC_CHANNEL_IR_TOP=$(ADC_IR_TOP) -DUSE_$(ADC_IR_TOP)
ap.CFLAGS += -DADC_CHANNEL_IR_NB_SAMPLES=$(ADC_IR_NB_SAMPLES)
</raw>
</makefile>
</module>