34 #define SEND_STEREO TRUE
38 #define STEREO_PORT (&((UART_LINK).device))
40 #define StereoGetch() STEREO_PORT ->get_byte(STEREO_PORT->periph)
50 #ifndef STEREO_BUF_SIZE
51 #define STEREO_BUF_SIZE 1024 // size of circular buffer
58 #define BASELINE_STEREO_MM 60.0
59 #define BRANDSPUNTSAFSTAND_STEREO 118.0*6
65 for (indexArray = 0; indexArray < lengthArray; indexArray++) {
66 if (disparity[indexArray] != 0) {
71 distancesMeters[indexArray] = 1000;
90 stereocam_data.
fresh = 0;
110 if (stereocam_data.
len > 100) {
115 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.
void * periph
pointer to parent implementation
standard protocol for TUDelft stereocamera data transfer
uint32_t ticks_per_sec
sys_time ticks per second (SYS_TIME_FREQUENCY)
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.
char_available_t char_available
check if a new character is available
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)