Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
I2C Infrared sensor

Module XML file: infrared_i2c.xml

No detailed description...

Example for airframe file

1 <modules>
2  <load name="infrared_i2c.xml"/>
3 </modules>

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.

  • infrared_i2c_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_i2c.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<!-- @define IR_I2C_READ_ONLY for read only module -->
<module name="ir_i2c" dir="sensors">
<doc>
<description>I2C Infrared sensor</description>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="IR I2C">
<dl_setting MAX="15" MIN="-15" STEP="0.5" VAR="infrared.roll_neutral" shortname="roll_neutral" param="IR_ROLL_NEUTRAL_DEFAULT" unit="rad" alt_unit="deg"/>
<dl_setting MAX="15" MIN="-15" STEP="0.5" VAR="infrared.pitch_neutral" shortname="pitch_neutral" param="IR_PITCH_NEUTRAL_DEFAULT" unit="rad" alt_unit="deg"/>
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="infrared.lateral_correction" shortname="360_lat_corr" module="subsystems/sensors/infrared" param="IR_LATERAL_CORRECTION"/>
<dl_setting MAX="1.5" MIN="0." STEP="0.1" VAR="infrared.longitudinal_correction" shortname="360_log_corr" param="IR_LONGITUDINAL_CORRECTION"/>
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="infrared.vertical_correction" shortname="360_vert_corr" param="IR_VERTICAL_CORRECTION"/>
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="infrared.correction_left" shortname="corr_left" param="IR_CORRECTION_LEFT"/>
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="infrared.correction_right" shortname="corr_right" param="IR_CORRECTION_RIGHT"/>
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="infrared.correction_up" shortname="corr_up" param="IR_CORRECTION_UP"/>
<dl_setting MAX="1.5" MIN="0.5" STEP="0.1" VAR="infrared.correction_down" shortname="corr_down" param="IR_CORRECTION_DOWN"/>
<dl_setting MAX="3" MIN="0" STEP="1" VAR="ir_i2c_conf_word" module="sensors/infrared_i2c" values="1|2|4|8" handler="SetConfWord"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="infrared_i2c.h"/>
</header>
<init fun="infrared_i2c_init()"/>
<periodic fun="infrared_i2c_update()" freq="60."/>
<!--periodic fun="infrared_i2cDownlink()" freq="1."/-->
<event fun="infrared_i2cEvent()"/>
<makefile target="ap|sim">
<define name="USE_INFRARED"/>
<file name="infrared.c" dir="subsystems/sensors"/>
<file name="infrared_i2c.c" dir="subsystems/sensors"/>
</makefile>
</module>