Paparazzi UAS  v6.3_unstable
Paparazzi is a free software Unmanned Aircraft System.
cam.h File Reference

Pan/Tilt camera API. More...

#include <inttypes.h>
#include "modules/core/commands.h"
+ Include dependency graph for cam.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define CAM_MODE_OFF   0 /* Do nothing */
#define CAM_MODE_ANGLES   1 /* Input: servo angles */
#define CAM_MODE_NADIR   2 /* Input: () */
#define CAM_MODE_XY_TARGET   3 /* Input: target_x, target_y */
#define CAM_MODE_WP_TARGET   4 /* Input: waypoint no */
#define CAM_MODE_AC_TARGET   5 /* Input: ac id */
#define CAM_MODE_RC   7
#define CAM_PAN_MAX   90
#define CAM_PAN_MIN   -90
#define CAM_TILT_MAX   90
#define CAM_TILT_MIN   -90
#define cam_SetPanCommand(x)   { cam_pan_command = x; command_set(COMMAND_CAM_PAN, cam_pan_command);}
#define cam_SetTiltCommand(x)   { cam_tilt_command = x; command_set(COMMAND_CAM_TILT, cam_tilt_command);}


void cam_periodic (void)
 For CAM_MODE_AC_TARGET mode. More...
void cam_init (void)


uint8_t cam_mode
uint8_t cam_lock
float cam_phi_c
float cam_theta_c
float cam_pan_c
float cam_tilt_c
float cam_target_x
 Radians, for CAM_MODE_ANGLES mode. More...
float cam_target_y
float cam_target_alt
uint8_t cam_target_wp
 For CAM_MODE_XY_TARGET mode. More...
uint8_t cam_target_ac
 For CAM_MODE_WP_TARGET mode. More...
int16_t cam_pan_command
int16_t cam_tilt_command

Detailed Description

Pan/Tilt camera API.

Definition in file cam.h.

Macro Definition Documentation


#define CAM_MODE_AC_TARGET   5 /* Input: ac id */

Definition at line 38 of file cam.h.


#define CAM_MODE_ANGLES   1 /* Input: servo angles */

Definition at line 34 of file cam.h.


#define CAM_MODE_NADIR   2 /* Input: () */

Definition at line 35 of file cam.h.


#define CAM_MODE_OFF   0 /* Do nothing */

Definition at line 33 of file cam.h.


#define CAM_MODE_RC   7

Definition at line 40 of file cam.h.



Definition at line 39 of file cam.h.


#define CAM_MODE_WP_TARGET   4 /* Input: waypoint no */

Definition at line 37 of file cam.h.


#define CAM_MODE_XY_TARGET   3 /* Input: target_x, target_y */

Definition at line 36 of file cam.h.


#define CAM_PAN_MAX   90

Definition at line 44 of file cam.h.


#define CAM_PAN_MIN   -90

Definition at line 47 of file cam.h.

◆ cam_SetPanCommand

#define cam_SetPanCommand (   x)    { cam_pan_command = x; command_set(COMMAND_CAM_PAN, cam_pan_command);}

Definition at line 78 of file cam.h.

◆ cam_SetTiltCommand

#define cam_SetTiltCommand (   x)    { cam_tilt_command = x; command_set(COMMAND_CAM_TILT, cam_tilt_command);}

Definition at line 80 of file cam.h.


#define CAM_TILT_MAX   90

Definition at line 50 of file cam.h.


#define CAM_TILT_MIN   -90

Definition at line 53 of file cam.h.

Function Documentation

◆ cam_init()

void cam_init ( void  )

Definition at line 119 of file cam.c.

References cam_mode, CAM_MODE0, DefaultPeriodic, register_periodic_telemetry(), and send_cam().

+ Here is the call graph for this function:

◆ cam_periodic()

Variable Documentation

◆ cam_lock

uint8_t cam_lock

Definition at line 91 of file cam.c.

Referenced by vPoint().

◆ cam_mode

uint8_t cam_mode

Definition at line 90 of file cam.c.

Referenced by cam_init(), cam_periodic(), cam_segment_periodic(), cam_segment_stop(), and vPoint().

◆ cam_pan_c

float cam_pan_c

Definition at line 72 of file cam.c.

Referenced by cam_angles(), cam_periodic(), and cam_target().

◆ cam_pan_command

int16_t cam_pan_command

Definition at line 93 of file cam.c.

◆ cam_phi_c

float cam_phi_c

Definition at line 80 of file cam.c.

Referenced by cam_angles(), and send_cam().

◆ cam_target_ac

uint8_t cam_target_ac


Definition at line 85 of file cam.c.

◆ cam_target_alt

float cam_target_alt

Definition at line 65 of file cam.h.

◆ cam_target_wp

uint8_t cam_target_wp


Definition at line 84 of file cam.c.

Referenced by cam_waypoint_target().

◆ cam_target_x

float cam_target_x

Radians, for CAM_MODE_ANGLES mode.

Definition at line 83 of file cam.c.

Referenced by cam_nadir(), cam_segment_periodic(), cam_target(), cam_waypoint_target(), and send_cam().

◆ cam_target_y

float cam_target_y

Definition at line 65 of file cam.h.

◆ cam_theta_c

float cam_theta_c

Definition at line 59 of file cam.h.

◆ cam_tilt_c

float cam_tilt_c

Definition at line 61 of file cam.h.

◆ cam_tilt_command

int16_t cam_tilt_command

Definition at line 94 of file cam.c.