Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
|STX|length|... More...
Go to the source code of this file.
Data Structures | |
union | dc_shot_union |
union | mora_status_union |
struct | mora_status_union::mora_status_struct |
struct | mora_transport |
struct | dc_shot_union.data |
Macros | |
#define | MORA_SHOOT 1 |
#define | MORA_SHOOT_MSG_SIZE (4*10) |
#define | MORA_BUFFER_EMPTY 2 |
#define | MORA_PAYLOAD 3 |
#define | MORA_PAYLOAD_MSG_SIZE 70 |
#define | MORA_STATUS 4 |
#define | MORA_STATUS_MSG_SIZE (4*2) |
#define | STX 0x99 |
#define | MoraSizeOf(_payload) (_payload+5) |
#define | MoraPutUint8(_byte) |
#define | MoraHeader(msg_id, payload_len) |
#define | MoraTrailer() |
#define | MoraPut1ByteByAddr(_byte) |
Functions | |
void | parse_mora (struct mora_transport *t, uint8_t c) |
Variables | |
uint8_t | mora_ck_a |
uint8_t | mora_ck_b |
struct mora_transport | mora_protocol |
|STX|length|...
payload=(length-4) bytes ...|Checksum A|Checksum B|
where checksum is computed over length and payload:
Definition in file protocol.h.
union dc_shot_union |
Definition at line 53 of file protocol.h.
Data Fields | ||
---|---|---|
uint8_t | bin[MORA_SHOOT_MSG_SIZE] | |
struct dc_shot_union | data | |
int32_t | i[10] |
union mora_status_union |
Definition at line 84 of file protocol.h.
Data Fields | ||
---|---|---|
uint8_t | bin[MORA_STATUS_MSG_SIZE] | |
struct mora_status_struct | data |
struct mora_status_union::mora_status_struct |
struct mora_transport |
struct dc_shot_union.data |
#define MORA_BUFFER_EMPTY 2 |
Definition at line 70 of file protocol.h.
Referenced by main(), and send_thumbnails().
#define MORA_PAYLOAD 3 |
Definition at line 74 of file protocol.h.
Referenced by digital_cam_uart_event(), and send_msg_image_buffer().
#define MORA_PAYLOAD_MSG_SIZE 70 |
Definition at line 75 of file protocol.h.
Referenced by digital_cam_uart_event(), and send_msg_image_buffer().
#define MORA_SHOOT 1 |
Definition at line 47 of file protocol.h.
Referenced by dc_send_command(), and main().
#define MORA_SHOOT_MSG_SIZE (4*10) |
Definition at line 48 of file protocol.h.
Referenced by dc_send_command(), and main().
#define MORA_STATUS 4 |
Definition at line 80 of file protocol.h.
Referenced by digital_cam_uart_event(), and send_msg_status().
#define MORA_STATUS_MSG_SIZE (4*2) |
Definition at line 81 of file protocol.h.
Referenced by digital_cam_uart_event(), and send_msg_status().
#define MoraHeader | ( | msg_id, | |
payload_len | |||
) |
Definition at line 109 of file protocol.h.
Referenced by dc_send_command(), send_msg_image_buffer(), send_msg_status(), and send_thumbnails().
#define MoraPut1ByteByAddr | ( | _byte | ) |
Definition at line 122 of file protocol.h.
#define MoraPutUint8 | ( | _byte | ) |
Definition at line 103 of file protocol.h.
Referenced by dc_send_command(), send_msg_image_buffer(), and send_msg_status().
#define MoraSizeOf | ( | _payload | ) | (_payload+5) |
Definition at line 101 of file protocol.h.
#define MoraTrailer | ( | ) |
Definition at line 117 of file protocol.h.
Referenced by dc_send_command(), send_msg_image_buffer(), send_msg_status(), and send_thumbnails().
#define STX 0x99 |
Definition at line 99 of file protocol.h.
Referenced by parse_mora().
void parse_mora | ( | struct mora_transport * | t, |
uint8_t | c | ||
) |
Definition at line 20 of file protocol.c.
References mora_transport::ck_a, mora_transport::ck_b, mora_transport::error, GOT_CRC1, GOT_LENGTH, GOT_MSGID, GOT_PAYLOAD, GOT_STX, mora_transport::msg_id, mora_transport::msg_received, mora_transport::payload, mora_transport::payload_idx, mora_transport::payload_len, mora_transport::status, STX, and UNINIT.
Referenced by digital_cam_uart_event(), and main().
uint8_t mora_ck_a |
Definition at line 5 of file protocol.c.
uint8_t mora_ck_b |
Definition at line 5 of file protocol.c.
struct mora_transport mora_protocol |
Definition at line 18 of file protocol.c.
Referenced by digital_cam_uart_event(), and main().