Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
hackhd module

HackHD control

No detailed description...

Example for airframe file

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

<module name="hackhd">
b'<define name="HACKHD_SYNC_SEND" value="TRUE|FALSE" />\n '
b'<define name="HACKHD_LOG" value="TRUE|FALSE" />\n '
b'<configure name="HACKHD_GPIO" value="GPIO" />\n '
</module>

Module configuration options

Configure Options

  • name: HACKHD_GPIO value: GPIO
    Description: control pin (e.g. GPIOC,GPIO5)

Define Options

  • name: HACKHD_SYNC_SEND value: TRUE|FALSE
    Description: enable telemetry report on camera position
  • name: HACKHD_LOG value: TRUE|FALSE
    Description: enable logging of camera shot orientation and position

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.

  • hackhd_periodic()
    • Frequency in Hz: 10
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.
  • hackhd_autoshoot()
    • Frequency in Hz: 10
    • Autorun: FALSE
      Periodic function is started by user command.
    • Start function: hackhd_autoshoot_start()
      Executed before the periodic function starts.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw hackhd.xml file:

<!DOCTYPE module SYSTEM "./module.dtd">
<module name="hackhd" dir="digital_cam">
<doc>
<description>HackHD control</description>
<configure name="HACKHD_GPIO" value="GPIO" description="control pin (e.g. GPIOC,GPIO5)"/>
<define name="HACKHD_SYNC_SEND" value="TRUE|FALSE" description="enable telemetry report on camera position"/>
<define name="HACKHD_LOG" value="TRUE|FALSE" description="enable logging of camera shot orientation and position"/>
</doc>
<settings>
<dl_settings name="control">
<dl_settings name="hackhd">
<dl_setting max="5" min="0" step="1" module="digital_cam/hackhd" var="hackhd.status" handler="SendCmd" shortname="HackHD" values="NONE|ON|OFF|START_REC|STOP_REC|SHOOT">
<strip_button name="HackHD Power ON" icon="on.png" value="1" group="maindc"/>
<strip_button name="HackHD Power OFF" icon="off.png" value="2" group="maindc"/>
<strip_button name="HackHD Start Record" icon="lookfore.png" value="3" group="hackhd"/>
<strip_button name="HackHD Stop Record" icon="kill.png" value="4" group="hackhd"/>
<strip_button name="HackHD Take Picture" icon="digital-camera.png" value="5" group="hackhd"/>
</dl_setting>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="hackhd.h"/>
</header>
<init fun="hackhd_init()"/>
<periodic fun="hackhd_periodic()" freq="10"/>
<periodic fun="hackhd_autoshoot()" freq="10" start="hackhd_autoshoot_start()" autorun="FALSE"/>
<makefile>
<define name="HACKHD_GPIO" value="$(HACKHD_GPIO)"/>
<file name="hackhd.c"/>
</makefile>
</module>