Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
time_countdown module

Count down time.

Set an initial countdown value in seconds (re-settable via settings/GCS) and countdown time_until_end variable to zero. E.g. allows to check how much time is left before the end of the competition.

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="time_countdown">
2  <define name="TIME_COUNTDOWN_START_VALUE" value="10000" />
3 </module>

Module configuration options

Define Options

  • name: TIME_COUNTDOWN_START_VALUE value: 10000
    Description: initial countdown value in seconds

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 time_countdown.xml file:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE module SYSTEM "module.dtd">
<module name="time_countdown" dir="time">
<doc>
<description>
Count down time.
Set an initial countdown value in seconds (re-settable via settings/GCS) and countdown @a time_until_end variable to zero.
E.g. allows to check how much time is left before the end of the competition.
</description>
<define name="TIME_COUNTDOWN_START_VALUE" value="10000" description="initial countdown value in seconds"/>
</doc>
<settings>
<dl_settings>
<dl_settings name="time">
<dl_setting var="time_until_end" module="modules/time/time_countdown" min="0" step="1" max="1800" param="TIME_COUNTDOWN_START_VALUE"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="time_countdown.h"/>
</header>
<init fun="time_countdown_init()"/>
<periodic fun="time_countdown_periodic_1hz()" freq="1"/>
<makefile>
<file name="time_countdown.c"/>
</makefile>
</module>