|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Control the camera via uart to chdk-ptp. More...
#include "uart_cam_ctrl.h"#include "generated/airframe.h"#include "modules/digital_cam/dc.h"#include "modules/datalink/telemetry.h"#include <BOARD_CONFIG>#include "modules/digital_cam/catia/protocol.h"#include "state.h"Go to the source code of this file.
Macros | |
| #define | CameraLinkDev (&((CAMERA_LINK).device)) |
| #define | CameraLinkTransmit(c) |
| #define | CameraLinkChAvailable() |
| #define | CameraLinkGetch() |
| #define | THUMB_MSG_SIZE MORA_PAYLOAD_MSG_SIZE |
| #define | THUMB_COUNT 10 |
Functions | |
| void | digital_cam_uart_event (void) |
| static void | send_thumbnails (struct transport_tx *trans, struct link_device *dev) |
| void | digital_cam_uart_init (void) |
| void | digital_cam_uart_periodic (void) |
| void | dc_send_command (uint8_t cmd) |
| Send Command To Camera. | |
Variables | |
| union dc_shot_union | dc_shot_msg |
| union mora_status_union | mora_status_msg |
| int | digital_cam_uart_status = 0 |
| int | digital_cam_uart_thumbnails = 0 |
| static uint8_t | thumbs [THUMB_COUNT][THUMB_MSG_SIZE] |
| static uint8_t | thumb_pointer = 0 |
| #define CameraLinkChAvailable | ( | ) |
Definition at line 51 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_event().
| #define CameraLinkDev (&((CAMERA_LINK).device)) |
Definition at line 49 of file uart_cam_ctrl.c.
| #define CameraLinkGetch | ( | ) |
Definition at line 52 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_event().
| #define CameraLinkTransmit | ( | c | ) |
Definition at line 50 of file uart_cam_ctrl.c.
| #define THUMB_COUNT 10 |
Definition at line 60 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_init(), and send_thumbnails().
| #define THUMB_MSG_SIZE MORA_PAYLOAD_MSG_SIZE |
Definition at line 59 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_init(), and send_thumbnails().
| void dc_send_command | ( | uint8_t | cmd | ) |
Send Command To Camera.
Definition at line 141 of file uart_cam_ctrl.c.
References LlaCoor_i::alt, DC_OFF, DC_ON, dc_photo_nr, dc_send_command_common(), dc_send_shot_position(), DC_SHOOT, dc_shot_msg, DC_TALLER, DC_WIDER, LlaCoor_i::lat, LlaCoor_i::lon, MORA_SHOOT, MORA_SHOOT_MSG_SIZE, MoraHeader, MoraPutUint8, MoraTrailer, Int32Eulers::phi, POS_BFP_OF_REAL, Int32Eulers::psi, state, stateGetHorizontalSpeedDir_i(), stateGetHorizontalSpeedNorm_i(), stateGetNedToBodyEulers_i(), stateGetPositionLla_i(), and Int32Eulers::theta.
| void digital_cam_uart_event | ( | void | ) |
Definition at line 65 of file uart_cam_ctrl.c.
References CameraLinkChAvailable, CameraLinkGetch, digital_cam_uart_status, MORA_PAYLOAD, MORA_PAYLOAD_MSG_SIZE, mora_protocol, MORA_STATUS, mora_status_msg, MORA_STATUS_MSG_SIZE, parse_mora(), thumb_pointer, and thumbs.
| void digital_cam_uart_init | ( | void | ) |
Definition at line 116 of file uart_cam_ctrl.c.
References DefaultPeriodic, digital_cam_uart_thumbnails, register_periodic_telemetry(), send_thumbnails(), serial_init(), THUMB_COUNT, THUMB_MSG_SIZE, and thumbs.
| void digital_cam_uart_periodic | ( | void | ) |
Definition at line 133 of file uart_cam_ctrl.c.
References dc_periodic().
|
static |
Definition at line 91 of file uart_cam_ctrl.c.
References dev, digital_cam_uart_thumbnails, MORA_BUFFER_EMPTY, MoraHeader, MoraTrailer, THUMB_COUNT, THUMB_MSG_SIZE, thumb_pointer, and thumbs.
Referenced by digital_cam_uart_init().
| union dc_shot_union dc_shot_msg |
Definition at line 54 of file uart_cam_ctrl.c.
Referenced by dc_send_command().
| int digital_cam_uart_status = 0 |
Definition at line 56 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_event().
| int digital_cam_uart_thumbnails = 0 |
Definition at line 58 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_init(), and send_thumbnails().
| union mora_status_union mora_status_msg |
Definition at line 55 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_event().
|
static |
Definition at line 62 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_event(), and send_thumbnails().
|
static |
Definition at line 61 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_event(), digital_cam_uart_init(), and send_thumbnails().