CCD.h 1.45 KB
#ifndef __CCD_H
#define __CCD_H
#include "sys.h"
#include "my_data.h"
#include "My_GetAdc.h"
#include "math.h"








#define BaudRate_Usart6  115200

# define Length_Usart6_RX 15
extern u8 USART6_RX_BUF[Length_Usart6_RX];
extern u8 USART6_RX_CNT;
extern u8 TIM4_Usart6Nums;


# define Head_CCD 0x4DAA


#define DisXPixel_CCD 0.22375f
#define DisYPixel_CCD 0.22f

extern float AngInstall_CCD;
extern u8 F_DirInstall_CCD;

#define Pi_Du 0.017453f   
#define Du_Pi 57.29578f   
typedef struct {
			u8 T;             //相机处理时间	
			u32 Value;        //码值
			short X;          //X值 0.1mm 
			short Y;          //Y值 0.1mm
			float Ang;        //角度值 单位度,
			signed char X_Delta;//相机X轴偏差±128mm
			signed char Y_Delta;//相机Y轴偏差±128mm
			signed char Ang_Delta;//相机X轴偏差±12.8,单位0.1度
			u8 CodeOn;
			u8 Tim4_Usart56Nums;
}Str_CCD;//相机参数结构体

extern Str_CCD CCD_M[2];



extern u8 TIM5_FanNums;
typedef struct {
			u16 Value;        //码值
			signed char X_Delta;//相机X轴偏差±128mm
			signed char Y_Delta;//相机Y轴偏差±128mm
			signed char Ang_Delta;//相机角度偏差±12.8,单位0.1度
}Str_AdjustP;//单点偏差参数结构体
void AdjustPVal_Fc(void);//调节点偏差
void CCD_Pro(void);
void AdjustPChoice_Fc(void);//调节点偏差选取
extern u8 CampareAdjustPEn;
extern short DeltaY_LTAdjust;//微调量
extern short DeltaX_LTAdjust;
# define AdjustPAllNums 3
extern Str_AdjustP F_AdjustPArr[AdjustPAllNums];

void CCD_Data_Analysis(u8 No,u8*Buffer);//相机数据解析
#endif