Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cam_track.h File Reference

blob tracking with cmucam More...

#include <inttypes.h>
#include "math/pprz_algebra_float.h"
#include "mcu_periph/uart.h"
+ Include dependency graph for cam_track.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __CamLink(dev, _x)   dev##_x
 
#define _CamLink(dev, _x)   __CamLink(dev, _x)
 
#define CamLink(_x)   _CamLink(CAM_LINK, _x)
 
#define CamBuffer()   CamLink(ChAvailable())
 
#define ReadCamBuffer()   { while (CamLink(ChAvailable())&&!cam_msg_received) parse_cam_buffer(CamLink(Getch())); }
 
#define CamUartSend1(c)   CamLink(Transmit(c))
 
#define CamUartSetBaudrate(_b)   CamLink(SetBaudrate(_b))
 
#define CamUartRunning   CamLink(TxRunning)
 
#define CamEventCheckAndHandle()
 

Functions

void track_init (void)
 
void track_periodic_task (void)
 
void track_event (void)
 
void parse_cam_msg (void)
 
void parse_cam_buffer (uint8_t)
 

Variables

struct FloatVect3 target_pos_ned
 
struct FloatVect3 target_speed_ned
 
struct FloatVect3 target_accel_ned
 
volatile uint8_t cam_msg_received
 

Detailed Description

blob tracking with cmucam

Definition in file cam_track.h.

Macro Definition Documentation

#define __CamLink (   dev,
  _x 
)    dev##_x

Definition at line 50 of file cam_track.h.

#define _CamLink (   dev,
  _x 
)    __CamLink(dev, _x)

Definition at line 51 of file cam_track.h.

#define CamBuffer ( )    CamLink(ChAvailable())

Definition at line 54 of file cam_track.h.

#define CamEventCheckAndHandle ( )
Value:
{ \
if (CamBuffer()) { \
} \
} \
}
void track_event(void)
Definition: cam_track.c:122
#define CamBuffer()
Definition: cam_track.h:54
volatile uint8_t cam_msg_received
Definition: cam_track.c:55
#define FALSE
Definition: imu_chimu.h:141
void parse_cam_msg(void)
Definition: cam_track.c:161
#define ReadCamBuffer()
Definition: cam_track.h:55

Definition at line 60 of file cam_track.h.

#define CamLink (   _x)    _CamLink(CAM_LINK, _x)

Definition at line 52 of file cam_track.h.

#define CamUartRunning   CamLink(TxRunning)

Definition at line 58 of file cam_track.h.

#define CamUartSend1 (   c)    CamLink(Transmit(c))

Definition at line 56 of file cam_track.h.

Referenced by track_periodic_task().

#define CamUartSetBaudrate (   _b)    CamLink(SetBaudrate(_b))

Definition at line 57 of file cam_track.h.

#define ReadCamBuffer ( )    { while (CamLink(ChAvailable())&&!cam_msg_received) parse_cam_buffer(CamLink(Getch())); }

Definition at line 55 of file cam_track.h.

Function Documentation

void parse_cam_msg ( void  )

Definition at line 161 of file cam_track.c.

References target_pos_ned, FloatVect3::x, FloatVect3::y, and FloatVect3::z.

void track_init ( void  )

Definition at line 59 of file cam_track.c.

References CAM_DATA_LEN, cam_data_len, cam_status, ins_ltp_initialised, TRUE, and UNINIT.

Variable Documentation

volatile uint8_t cam_msg_received

Definition at line 55 of file cam_track.c.

Referenced by parse_cam_buffer().

struct FloatVect3 target_accel_ned

Definition at line 36 of file cam_track.c.

struct FloatVect3 target_pos_ned

Definition at line 34 of file cam_track.c.

Referenced by parse_cam_msg(), and track_event().

struct FloatVect3 target_speed_ned

Definition at line 35 of file cam_track.c.