Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
servo_cam_ctrl.h File Reference

Digital Camera Control. More...

#include "dc.h"
#include "std.h"
#include "inter_mcu.h"
#include "generated/airframe.h"
+ Include dependency graph for servo_cam_ctrl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define DC_PUSH(X)   ap_state->commands[X] = -MAX_PPRZ;
#define DC_RELEASE(X)   ap_state->commands[X] = MAX_PPRZ;
#define DC_SHUTTER_DELAY   2 /* 4Hz -> 0.5s */


static void servo_cam_ctrl_init (void)
static void servo_cam_ctrl_periodic (void)


uint8_t dc_timer

Detailed Description

Digital Camera Control.

Provides the control of the shutter and the zoom of a digital camera through standard binary IOs of the board.

Configuration: Since the API of led.h is used, connected pins must be defined as led numbers (usually in the airframe file): <define name="DC_SHUTTER_SERVO" value="10"> <define name="DC_ZOOM_IN_SERVO" value="7"> <define name="DC_ZOOM_OUT_SERVO" value="8"> <define name="DC_POWER_SERVO" value="9"> Related bank and pin must also be defined: <define name="LED_10_BANK" value="0"> <define name="LED_10_PIN" value="2"> The required initialization (dc_init()) and periodic (4Hz) process

Definition in file servo_cam_ctrl.h.

Macro Definition Documentation

#define DC_PUSH (   X)    ap_state->commands[X] = -MAX_PPRZ;

Definition at line 66 of file servo_cam_ctrl.h.

#define DC_RELEASE (   X)    ap_state->commands[X] = MAX_PPRZ;

Definition at line 67 of file servo_cam_ctrl.h.

Referenced by servo_cam_ctrl_periodic().

#define DC_SHUTTER_DELAY   2 /* 4Hz -> 0.5s */

Definition at line 70 of file servo_cam_ctrl.h.

Function Documentation

static void servo_cam_ctrl_init ( void  )

Definition at line 57 of file servo_cam_ctrl.h.

References dc_init(), and dc_timer.

+ Here is the call graph for this function:

static void servo_cam_ctrl_periodic ( void  )

Definition at line 79 of file servo_cam_ctrl.h.

References dc_periodic_4Hz(), DC_RELEASE, and dc_timer.

+ Here is the call graph for this function:

Variable Documentation

uint8_t dc_timer

Definition at line 26 of file led_cam_ctrl.c.

Referenced by dc_send_command(), servo_cam_ctrl_init(), and servo_cam_ctrl_periodic().