Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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!

<module name="time_countdown">
b'<define name="TIME_COUNTDOWN_START_VALUE" value="10000" />\n '
</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:

<!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>