/** ****************************************************************************** * @file : YDLidar.h * @brief : Header for YDLidar.c file. * This file contains the Lidar defines of the application. ****************************************************************************** */ #ifndef __YDLIDAR_H__ #define __YDLIDAR_H__ #define YDLIDAR_VER (0x100) #pragma anon_unions typedef struct LidarDotData { unsigned char intensity; unsigned char s1; /* struct { unsigned char flag:2; unsigned char s1:6; }; */ unsigned char s2; }stLidarDotData; typedef struct tagLidarDotsPkt { unsigned short StSign; unsigned char CT; unsigned char LSN; unsigned short FSA; unsigned short LSA; unsigned short CS; stLidarDotData LidarDotDatas[40]; }stLidarDotsPkt, *pLidarDotsPkt; typedef struct tagLidarVector { int intensit; int angle; int value; }stLidarVector; typedef struct tagLidarDot { int x; int y; int distance; }stLidarDot; extern int nPosX; extern int nPosY; extern int nPosZ; extern int nPosZ1, nPosZ2; extern int pCount1; extern int pCount2; extern int dCount1; extern int dCount2; extern int vCount1; extern int vCount2; int YdLidarStart(int nIdx); /* Start LiDar Running , nIde = 0 , 1 , -1 == ALL */ int YdLidarStop(int nIdx); /* stop Lidar Running , nIde = 0 , 1 , -1 == ALL */ int YdLidarParsePkt(int nLidarIdx, stLidarDotsPkt * pLindarPkt, int len1); #endif /* __YDLIDAR_H__ */