Paparazzi UAS
v5.8.2_stable-0-g6260b7c
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 "subsystems/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) CameraLinkDev->put_byte(CameraLinkDev->periph, c) |
#define | CameraLinkChAvailable() CameraLinkDev->char_available(CameraLinkDev->periph) |
#define | CameraLinkGetch() CameraLinkDev->get_byte(CameraLinkDev->periph) |
#define | THUMB_MSG_SIZE MORA_PAYLOAD_MSG_SIZE |
#define | THUMB_COUNT 10 |
Functions | |
void | digital_cam_uart_event (void) |
void | digital_cam_uart_init (void) |
void | digital_cam_uart_periodic (void) |
void | dc_send_command (uint8_t cmd) |
Send Command To Camera. More... | |
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 | ( | ) | CameraLinkDev->char_available(CameraLinkDev->periph) |
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 | ( | ) | CameraLinkDev->get_byte(CameraLinkDev->periph) |
Definition at line 52 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_event().
#define CameraLinkTransmit | ( | c | ) | CameraLinkDev->put_byte(CameraLinkDev->periph, 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().
#define THUMB_MSG_SIZE MORA_PAYLOAD_MSG_SIZE |
Definition at line 59 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_init().
void dc_send_command | ( | uint8_t | cmd | ) |
Send Command To Camera.
Definition at line 143 of file uart_cam_ctrl.c.
References LlaCoor_i::alt, State::alt_agl_f, dc_shot_union::bin, dc_shot_union::data, DC_OFF, DC_ON, dc_photo_nr, 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 mora_status_union::bin, CameraLinkChAvailable, CameraLinkGetch, mora_status_union::data, digital_cam_uart_status, MORA_PAYLOAD, MORA_PAYLOAD_MSG_SIZE, mora_protocol, MORA_STATUS, mora_status_msg, MORA_STATUS_MSG_SIZE, mora_transport::msg_id, mora_transport::msg_received, parse_mora(), mora_transport::payload, mora_status_union::mora_status_struct::shots, thumb_pointer, and thumbs.
void digital_cam_uart_init | ( | void | ) |
Definition at line 116 of file uart_cam_ctrl.c.
References dc_init(), DefaultPeriodic, digital_cam_uart_thumbnails, register_periodic_telemetry(), serial_init(), THUMB_COUNT, THUMB_MSG_SIZE, and thumbs.
void digital_cam_uart_periodic | ( | void | ) |
Definition at line 135 of file uart_cam_ctrl.c.
References dc_periodic().
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().
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().
|
static |
Definition at line 61 of file uart_cam_ctrl.c.
Referenced by digital_cam_uart_event(), and digital_cam_uart_init().