CCD.h
1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#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