29 #include "generated/airframe.h"
49 #define CameraLinkDev (&((CAMERA_LINK).device))
50 #define CameraLinkTransmit(c) CameraLinkDev->put_byte(CameraLinkDev->periph, 0, c)
51 #define CameraLinkChAvailable() CameraLinkDev->char_available(CameraLinkDev->periph)
52 #define CameraLinkGetch() CameraLinkDev->get_byte(CameraLinkDev->periph)
59 #define THUMB_MSG_SIZE MORA_PAYLOAD_MSG_SIZE
60 #define THUMB_COUNT 10
90 #if PERIODIC_TELEMETRY
126 #if PERIODIC_TELEMETRY
int32_t psi
in rad with INT32_ANGLE_FRAC
static int32_t stateGetHorizontalSpeedDir_i(void)
Get dir of horizontal ground speed (int).
union mora_status_union mora_status_msg
Digital Camera Control Over UART with download of thumbnails over the PAYLOAD message.
Periodic telemetry system header (includes downlink utility and generated code).
int32_t theta
in rad with INT32_ANGLE_FRAC
#define POS_BFP_OF_REAL(_af)
struct dc_shot_union::@288 data
static uint8_t thumb_pointer
struct mora_transport mora_protocol
#define MoraPutUint8(_byte)
uint16_t dc_photo_nr
export the number of the last photo
void dc_send_command(uint8_t cmd)
Send Command To Camera.
#define CameraLinkChAvailable()
int32_t alt
in millimeters above WGS84 reference ellipsoid
void dc_init(void)
initialize settings
Standard Digital Camera Control Interface.
uint8_t bin[MORA_SHOOT_MSG_SIZE]
int digital_cam_uart_thumbnails
void dc_send_command_common(uint8_t cmd)
Command sending function.
static uint8_t thumbs[THUMB_COUNT][THUMB_MSG_SIZE]
uint8_t bin[MORA_STATUS_MSG_SIZE]
#define DefaultPeriodic
Set default periodic telemetry.
int32_t lon
in degrees*1e7
static uint32_t stateGetHorizontalSpeedNorm_i(void)
Get norm of horizontal ground speed (int).
#define MORA_STATUS_MSG_SIZE
float alt_agl_f
Altitude above ground level.
static const struct usb_device_descriptor dev
void digital_cam_uart_event(void)
#define MORA_SHOOT_MSG_SIZE
int serial_init(char *port_name)
int32_t phi
in rad with INT32_ANGLE_FRAC
API to get/set the generic vehicle states.
void dc_periodic(void)
periodic function
void digital_cam_uart_periodic(void)
union dc_shot_union dc_shot_msg
#define MORA_PAYLOAD_MSG_SIZE
int digital_cam_uart_status
void digital_cam_uart_init(void)
static struct Int32Eulers * stateGetNedToBodyEulers_i(void)
Get vehicle body attitude euler angles (int).
int32_t lat
in degrees*1e7
#define MoraHeader(msg_id, payload_len)
struct mora_status_union::mora_status_struct data
#define CameraLinkGetch()
void parse_mora(struct mora_transport *t, uint8_t c)
static void send_thumbnails(struct transport_tx *trans, struct link_device *dev)
static struct LlaCoor_i * stateGetPositionLla_i(void)
Get position in LLA coordinates (int).
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
void dc_send_shot_position(void)
Send Down the coordinates of where the photo was taken.
#define MORA_BUFFER_EMPTY