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

Digital Photo Camera Triggering (using a servo)

This module controls triggering of an attached external digital camera via a servo channel. It can trigger photos based on GPS distance, time or circle radius in both fixedwings and rotorcraft.

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="digital_cam_servo">
2  <define name="DC_SHOOT_ON_BUTTON_RELEASE" />
3  <define name="DC_SHUTTER_SERVO" value="servo" />
4  <define name="DC_ZOOM_IN_SERVO" value="servo" />
5  <define name="DC_ZOOM_OUT_SERVO" value="servo" />
6  <define name="DC_POWER_SERVO" value="servo" />
7  <define name="DC_AUTOSHOOT_PERIOD" value="0.5" />
8  <define name="DC_AUTOSHOOT_DISTANCE_INTERVAL" value="50" />
9 </module>

Module configuration options

Define Options

  • name: DC_SHOOT_ON_BUTTON_RELEASE value: None
    Description: if defined, call dc_send_shot_postion on button release instead of on push
  • name: DC_SHUTTER_SERVO value: servo
    Description: mandatory, Servo to control shutter
  • name: DC_ZOOM_IN_SERVO value: servo
    Description: optional, Servo to activate zoom in
  • name: DC_ZOOM_OUT_SERVO value: servo
    Description: optional, Servo to activate zoom out
  • name: DC_POWER_SERVO value: servo
    Description: optional, Servo to control power
  • name: DC_AUTOSHOOT_PERIOD value: 0.5
    Description: time period for DC_AUTOSHOOT_PERIODIC in seconds
  • name: DC_AUTOSHOOT_DISTANCE_INTERVAL value: 50
    Description: grid in meters

Conflicts

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

<!DOCTYPE module SYSTEM "./module.dtd">
<module name="digital_cam_servo" dir="digital_cam">
<doc>
<description>
Digital Photo Camera Triggering (using a servo)
This module controls triggering of an attached external digital camera via a servo channel.
It can trigger photos based on GPS distance, time or circle radius in both fixedwings and rotorcraft.
</description>
<define name="DC_SHOOT_ON_BUTTON_RELEASE" description="if defined, call dc_send_shot_postion on button release instead of on push"/>
<define name="DC_SHUTTER_SERVO" value="servo" description="mandatory, Servo to control shutter"/>
<define name="DC_ZOOM_IN_SERVO" value="servo" description="optional, Servo to activate zoom in"/>
<define name="DC_ZOOM_OUT_SERVO" value="servo" description="optional, Servo to activate zoom out"/>
<define name="DC_POWER_SERVO" value="servo" description="optional, Servo to control power"/>
<define name="DC_AUTOSHOOT_PERIOD" value="0.5" description="time period for DC_AUTOSHOOT_PERIODIC in seconds"/>
<define name="DC_AUTOSHOOT_DISTANCE_INTERVAL" value="50" description="grid in meters"/>
</doc>
<conflicts>digital_cam,digital_cam_i2c,digital_cam_uart,digital_cam_video</conflicts>
<header>
<file name="servo_cam_ctrl.h"/>
<file name="dc.h"/>
</header>
<init fun="servo_cam_ctrl_init()"/>
<periodic fun="servo_cam_ctrl_periodic()" freq="10" autorun="TRUE"/>
<makefile target="ap|sim|nps">
<define name="DIGITAL_CAM"/>
<file name="servo_cam_ctrl.c"/>
<file name="dc.c"/>
<define name="SENSOR_SYNC_SEND" value="1"/>
</makefile>
</module>