35 #define SEND_STEREO TRUE
39 #define STEREO_PORT (&((UART_LINK).device))
41 #define StereoGetch() STEREO_PORT ->get_byte(STEREO_PORT->periph)
51 #ifndef STEREO_BUF_SIZE
52 #define STEREO_BUF_SIZE 1024 // size of circular buffer
59 #define BASELINE_STEREO_MM 60.0
60 #define BRANDSPUNTSAFSTAND_STEREO 118.0*6
66 for (indexArray = 0; indexArray < lengthArray; indexArray++) {
67 if (disparity[indexArray] != 0) {
72 distancesMeters[indexArray] = 1000;
91 stereocam_data.
fresh = 0;
111 if (stereocam_data.
len > 100) {
116 stereocam_data.
data);
struct MsgProperties MsgProperties
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
Periodic telemetry system header (includes downlink utility and generated code).
void stereocam_start(void)
volatile uint32_t nb_tick
SYS_TIME_TICKS since startup.
standard protocol for TUDelft stereocamera data transfer
uint32_t ticks_per_sec
sys_time ticks per second (SYS_TIME_FREQUENCY)
Architecture independent timing functions.
interface to the TU Delft serial stereocam
void stereocam_stop(void)
uint8array stereocam_data
MsgProperties msgProperties
#define DefaultChannel
SITL.
void stereocam_disparity_to_meters(uint8_t *disparity, float *distancesMeters, int lengthArray)
#define BRANDSPUNTSAFSTAND_STEREO
uint16_t stereoprot_add(uint16_t counter, uint16_t i, uint16_t buffer_size)
Increment circular buffer counter by i.
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.
struct link_device * linkdev
uint8_t ser_read_buf[STEREO_BUF_SIZE]
uint8_t msg_buf[STEREO_BUF_SIZE]
#define BASELINE_STEREO_MM
void stereocam_periodic(void)