Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Pan/Tilt camera API. More...
Go to the source code of this file.
Macros | |
#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_STABILIZED 6 |
#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) { ap_state->commands[COMMAND_CAM_PAN] = cam_pan_command = x;} |
#define | cam_SetTiltCommand(x) { ap_state->commands[COMMAND_CAM_TILT] = cam_tilt_command = x;} |
Functions | |
void | cam_periodic (void) |
For CAM_MODE_AC_TARGET mode. More... | |
void | cam_init (void) |
Variables | |
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 |
Pan/Tilt camera API.
Definition in file cam.h.
#define CAM_MODE_AC_TARGET 5 /* Input: ac id */ |
Definition at line 38 of file cam.h.
Referenced by cam_periodic().
#define CAM_MODE_ANGLES 1 /* Input: servo angles */ |
Definition at line 34 of file cam.h.
Referenced by cam_periodic().
#define CAM_MODE_NADIR 2 /* Input: () */ |
Definition at line 35 of file cam.h.
Referenced by cam_periodic().
#define CAM_MODE_OFF 0 /* Do nothing */ |
Definition at line 33 of file cam.h.
Referenced by cam_periodic(), and cam_segment_stop().
#define CAM_MODE_RC 7 |
Definition at line 40 of file cam.h.
Referenced by cam_periodic(), and vPoint().
#define CAM_MODE_STABILIZED 6 |
Definition at line 39 of file cam.h.
Referenced by cam_periodic(), and vPoint().
#define CAM_MODE_WP_TARGET 4 /* Input: waypoint no */ |
Definition at line 37 of file cam.h.
Referenced by cam_periodic(), and vPoint().
Definition at line 36 of file cam.h.
Referenced by cam_periodic(), cam_segment_periodic(), and vPoint().
#define CAM_PAN_MAX 90 |
Definition at line 44 of file cam.h.
Referenced by cam_angles(), and vPoint().
#define CAM_PAN_MIN -90 |
Definition at line 47 of file cam.h.
Referenced by cam_angles(), and vPoint().
#define cam_SetPanCommand | ( | x | ) | { ap_state->commands[COMMAND_CAM_PAN] = cam_pan_command = x;} |
#define cam_SetTiltCommand | ( | x | ) | { ap_state->commands[COMMAND_CAM_TILT] = cam_tilt_command = x;} |
#define CAM_TILT_MAX 90 |
Definition at line 50 of file cam.h.
Referenced by cam_angles(), and vPoint().
#define CAM_TILT_MIN -90 |
Definition at line 53 of file cam.h.
Referenced by cam_angles(), and vPoint().
void cam_init | ( | void | ) |
Definition at line 120 of file cam.c.
References cam_mode, CAM_MODE0, DefaultPeriodic, register_periodic_telemetry(), and send_cam().
void cam_periodic | ( | void | ) |
For CAM_MODE_AC_TARGET mode.
Definition at line 130 of file cam.c.
References ap_state, cam_ac_target(), cam_angles(), cam_mode, CAM_MODE_AC_TARGET, CAM_MODE_ANGLES, CAM_MODE_NADIR, CAM_MODE_OFF, CAM_MODE_RC, CAM_MODE_STABILIZED, CAM_MODE_WP_TARGET, CAM_MODE_XY_TARGET, cam_nadir(), CAM_PAN0, cam_pan_c, cam_target(), CAM_TILT0, cam_tilt_c, cam_waypoint_target(), LED_OFF, LED_ON, MAX_PPRZ, MIN_PPRZ, pprz_mode, PPRZ_MODE_AUTO1, and PPRZ_MODE_AUTO2.
uint8_t cam_mode |
Definition at line 91 of file cam.c.
Referenced by cam_init(), cam_periodic(), cam_segment_periodic(), cam_segment_stop(), and vPoint().
float cam_pan_c |
Definition at line 73 of file cam.c.
Referenced by cam_angles(), cam_periodic(), and cam_target().
float cam_phi_c |
Definition at line 81 of file cam.c.
Referenced by cam_angles(), and send_cam().
uint8_t cam_target_ac |
float cam_target_alt |
Definition at line 84 of file cam.c.
Referenced by cam_ac_target(), cam_nadir(), cam_segment_periodic(), cam_target(), and cam_waypoint_target().
uint8_t cam_target_wp |
For CAM_MODE_XY_TARGET mode.
Definition at line 85 of file cam.c.
Referenced by cam_waypoint_target().
float cam_target_x |
Radians, for CAM_MODE_ANGLES mode.
Definition at line 84 of file cam.c.
Referenced by cam_ac_target(), cam_nadir(), cam_segment_periodic(), cam_target(), cam_waypoint_target(), and send_cam().
float cam_target_y |
Definition at line 84 of file cam.c.
Referenced by cam_ac_target(), cam_nadir(), cam_segment_periodic(), cam_target(), cam_waypoint_target(), and send_cam().
float cam_theta_c |
Definition at line 82 of file cam.c.
Referenced by cam_angles(), and send_cam().
float cam_tilt_c |
Definition at line 79 of file cam.c.
Referenced by cam_angles(), cam_periodic(), and cam_target().