Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
standard protocol for TUDelft stereocamera data transfer More...
Go to the source code of this file.
Data Structures | |
struct | MsgProperties |
Typedefs | |
typedef struct MsgProperties | MsgProperties |
Functions | |
uint16_t | stereoprot_add (uint16_t counter, uint16_t i, uint16_t buffer_size) |
Increment circular buffer counter by i. More... | |
uint16_t | stereoprot_diff (uint16_t counter, uint16_t i, uint16_t buffer_size) |
Decrement circular buffer counter by i. More... | |
uint8_t | stereoprot_isEndOfMsg (uint8_t *stack, uint16_t i, uint16_t buffer_size) |
Checks if the sequence in the array is equal to 255-0-0-171, as this means that this is the end of an image. More... | |
uint8_t | stereoprot_isStartOfMsg (uint8_t *stack, uint16_t i, uint16_t buffer_size) |
Checks if the sequence in the array is equal to 255-0-0-171, as this means a new image is starting from here. More... | |
uint8_t | WritePart (struct link_device *, uint8_t *, uint8_t) |
void | stereoprot_sendArray (struct link_device *fd, uint8_t *b, uint8_t array_width, uint8_t array_height) |
uint8_t | handleStereoPackage (uint8_t newByte, uint16_t buffer_size, uint16_t *insert_loc, uint16_t *extract_loc, uint16_t *msg_start, uint8_t *msg_buf, uint8_t *ser_read_buf, uint8_t *stereocam_datadata_new, uint8_t *stereocam_datalen, uint8_t *stereocam_data_matrix_width, uint8_t *stereocam_data_matrix_height) |
Get all available data from stereo com link and decode any complete messages. More... | |
void | stereoprot_get_msg_properties (uint8_t *raw, MsgProperties *properties, uint16_t start, uint16_t buffer_size) |
Retrieve size of image from message. More... | |
standard protocol for TUDelft stereocamera data transfer
Definition in file stereoprotocol.h.
struct MsgProperties |
Definition at line 33 of file stereoprotocol.h.
Data Fields | ||
---|---|---|
uint8_t | height | |
uint16_t | positionImageStart | |
uint8_t | width |
typedef struct MsgProperties MsgProperties |
Definition at line 38 of file stereoprotocol.h.
uint8_t handleStereoPackage | ( | uint8_t | newByte, |
uint16_t | buffer_size, | ||
uint16_t * | insert_loc, | ||
uint16_t * | extract_loc, | ||
uint16_t * | msg_start, | ||
uint8_t * | msg_buf, | ||
uint8_t * | ser_read_buf, | ||
uint8_t * | stereocam_datadata_new, | ||
uint8_t * | stereocam_datalen, | ||
uint8_t * | stereocam_data_matrix_width, | ||
uint8_t * | stereocam_data_matrix_height | ||
) |
Get all available data from stereo com link and decode any complete messages.
Returns as soon as a complete message is found. Messages placed in msg_buf
Definition at line 122 of file stereoprotocol.c.
References extract_loc, MsgProperties::height, insert_loc, msgProperties, stereoprot_add(), stereoprot_diff(), stereoprot_get_msg_properties(), stereoprot_isEndOfMsg(), stereoprot_isStartOfMsg(), and MsgProperties::width.
Referenced by stereocam_periodic().
Increment circular buffer counter by i.
Definition at line 32 of file stereoprotocol.c.
Referenced by handleStereoPackage(), stereocam_periodic(), stereoprot_get_msg_properties(), stereoprot_isEndOfMsg(), and stereoprot_isStartOfMsg().
Decrement circular buffer counter by i.
Definition at line 41 of file stereoprotocol.c.
Referenced by handleStereoPackage(), and stereoprot_get_msg_properties().
void stereoprot_get_msg_properties | ( | uint8_t * | raw, |
MsgProperties * | properties, | ||
uint16_t | start, | ||
uint16_t | buffer_size | ||
) |
Retrieve size of image from message.
Definition at line 177 of file stereoprotocol.c.
References MsgProperties::height, stereoprot_add(), stereoprot_diff(), and MsgProperties::width.
Referenced by handleStereoPackage().
Checks if the sequence in the array is equal to 255-0-0-171, as this means that this is the end of an image.
Definition at line 50 of file stereoprotocol.c.
References stereoprot_add().
Referenced by handleStereoPackage().
Checks if the sequence in the array is equal to 255-0-0-171, as this means a new image is starting from here.
Definition at line 64 of file stereoprotocol.c.
References stereoprot_add().
Referenced by handleStereoPackage().
void stereoprot_sendArray | ( | struct link_device * | fd, |
uint8_t * | b, | ||
uint8_t | array_width, | ||
uint8_t | array_height | ||
) |
Definition at line 88 of file stereoprotocol.c.
References WritePart().
Referenced by write_serial_rot().
Definition at line 77 of file stereoprotocol.c.
References fd.
Referenced by stereoprot_sendArray().