my_data.h
2.09 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
#ifndef _MY_DATA_H
#define _MY_DATA_H
#include "sys.h"
extern u8 dataCommunicationMode; //模式
extern u8 dataSendEn;
extern u8 dataLocalIp[4]; //本地IP
extern u8 dataSubnetMask[4]; //子网掩码
extern u8 dataGateway[4]; //默认网关
extern u8 dataRemoteIp[4]; //远端IP
extern u16 dataRemoteProt; //端口号 1017
extern u8 dataAgvName[10]; //AGV名称 1018
extern int dataWheelDiameter; //轮子直径 1019
extern int dataWheelsDistance; //轮子之间的距离 1020
extern float dataCameraMountingAngle; //相机安装偏角 1021
extern float dataTrayInitialAngle; //托盘零点偏角 1022
extern float dataRotationAccuracy; //旋转精度 1023
extern float dataCouplingCoefficient; //耦合系数 1024
extern float dataTrayAdjustAccuracy; //托盘调整精度 1025
extern int dataUpSpeed; //上升速度 1026
extern int dataDownSpeed; //下降速度 1027
extern int dataRectifyDistance; //纠偏距离 1028
extern float dataRectifyCoefficient; //纠偏调整量 1029
extern float dataRunSpeedMax1; //1级最高速 1030
extern float dataRunSpeedMax2; //2级最高速 1031
extern float dataRunSpeedMax3; //3级最高速 1032
extern float dataRunKp; //行走PID 1033
extern float dataRunKi; //行走PID 1034
extern float dataRunKd; //行走PID 1035
extern float dataWheelReductionRatio; //轮子减速比 1036
extern float dataUpDownReductionRatio; //升降减速比 1037
extern float dataTrayReductionRatio; //托盘减速比 1038
extern int dataRotSpeedMax1; //旋转1级最高速 1039
extern int dataRotSpeedMax2; //旋转2级最高速 1040
extern int dataRotCorrection; //旋转修正值 1041
extern int dataThreadDis; //螺纹间距 1042
extern u8 TestActionType;//测试命令的动作类型
int Math_power10(u8 power);
int AsciiToInt(u8 num);
u8 intToString(int num,u8 digit);
u8 floatToString(float num,int digit);
void dataToString(u8* str,int data_type,int data_int,float data_float );
void dataToServer(int data_id,int data_type,u8* data_char,int data_int,float data_float);
void ValueTcpR(void);
void ReadFromRom(void);
void ReadFromServer(int id);
void WriteToRom(void);
void WriteToServer(void);
u8 getTestActionType(void);
void WriteReadPersistent(void);
#endif