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
light module

Navigation leds

No detailed description...

Example for airframe file

Add to your firmware section:

1 <module name="light"/>

Module configuration options

Airframe file section

  • section name: LIGHT
    • name LIGHT_LED_STROBE value: X
      Description: led number
    • name LIGHT_LED_NAV value: X
      Description: led number
    • name STROBE_LIGHT_MODE_DEFAULT value: X
      Description: flashing mode for strobe light
    • name NAV_LIGHT_MODE_DEFAULT value: X
      Description: flashing mode for nav light

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.

  • periodic_light()
    • Period in seconds: 0.05
    • Autorun: TRUE
      Periodic function automatically starts after init.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw light.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="light">
<doc>
<description>Navigation leds</description>
<section name="LIGHT">
<define name="LIGHT_LED_STROBE" value="X" description="led number"/>
<define name="LIGHT_LED_NAV" value="X" description="led number"/>
<define name="STROBE_LIGHT_MODE_DEFAULT" value="X" description="flashing mode for strobe light"/>
<define name="NAV_LIGHT_MODE_DEFAULT" value="X" description="flashing mode for nav light"/>
</section>
</doc>
<settings>
<dl_settings NAME="lights control">
<dl_settings NAME="lights">
<dl_setting var="strobe_light_mode" min="0" max="6" step="1" module="light/light" values="OFF|ON|BLINK_1|BLINK_2|BLINK_3|COMPLEX_1|COMPLEX_2">
<strip_button name="LightOn" icon="on.png" value="1" group="light"/>
<strip_button name="LightOff" icon="off.png" value="0" group="light"/>
</dl_setting>
<dl_setting var="nav_light_mode" min="0" max="4" step="1" values="OFF|ON|BLINK_1|BLINK_2|BLINK_3"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="light.h"/>
</header>
<init fun="init_light()"/>
<periodic fun="periodic_light()" period="0.05" autorun="TRUE"/>
<makefile target="ap">
<!-- these configureeters should be set in the airframe file unless you want the defaults
<define name="LIGHT_LED_STROBE" value="3"/>
<define name="LIGHT_LED_NAV" value="4"/>
<define name="STROBE_LIGHT_MODE_DEFAULT" value="5"/>
<define name="NAV_LIGHT_MODE_DEFAULT" value="4"/>
-->
<file name="light.c"/>
</makefile>
</module>