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
Battery checker module

Module XML file: bat_checker.xml

No detailed description...

Example for airframe file

This example contains all possible configuration options, not all of them are mandatory!

1 <modules>
2  <load name="bat_checker.xml">
3  <define name="BAT_CHECKER_DELAY" value="delay" />
4  <define name="BAT_CHECKER_LED" value="X" />
5  </load>
6 </modules>

Module configuration options

Define Options

  • name: BAT_CHECKER_DELAY value: delay
    Description: number of seconds the battery voltage has to below LOW_BAT_LEVEL before warning signal is activated
  • name: BAT_CHECKER_LED value: X
    Description: led number to use for the warning signal

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.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw bat_checker.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="bat_checker" dir="energy">
<doc>
<description>Battery checker module</description>
<define name="BAT_CHECKER_DELAY" value="delay" description="number of seconds the battery voltage has to below LOW_BAT_LEVEL before warning signal is activated"/>
<define name="BAT_CHECKER_LED" value="X" description="led number to use for the warning signal"/>
</doc>
<header>
<file name="bat_checker.h"/>
</header>
<init fun="init_bat_checker()"/>
<periodic fun="bat_checker_periodic()" freq="2" autorun="TRUE"/>
<makefile target="ap">
<file name="bat_checker.c"/>
</makefile>
</module>