all_value.h 4.24 KB
#ifndef __ALL_VALUE_H
#define __ALL_VALUE_H
#include "sys.h"
#include "my_data.h"
#include "My_GetAdc.h"
#include "math.h"
#include "Message.h"
#include "Axis.h"
#include "PauseCourse.h"
#include "ErrCourse.h"
#include "BasicMath.h"
#include "WorkCourse.h"
#include "IN_OUT.h"
#include "ActionCourse.h"
#include "Commun_TCP.h"



/********************硬件使用***********************/
#define ZHUANJDZen 1u	
#define WeightEn 0//存在测重
# define ConveyorEn 0u//是否有输送
#define TZMiss 0u
#define AngLineDeltaMax 4   // 点点间直线角度允许的最大变化,单位度
#define AngLineDuanDeltaMax 20   // 短距离最大变化,单位度
#define DisLineDuan  400
extern u16 Tim5_SystemTimeNums;
extern u8 F_WheelTy;
//typedef struct 
//{
//	u8 step;           //逻辑步骤
//	u8 act;            //动作步骤          
//	u8 act_t;          //动作步骤返回值      
//	u8 over;           //任务完成
//	double distance;   //距离
//	double distancearc;
////	double distancey;
//}TASK;

typedef struct 
{
	double circle;     //计算旋转弧度
	double trayphi;	   //计算托盘旋转角度
//	int traytime;      //计算托盘旋转时间
}MATH;




/**TIM区域选择输出**/
extern u8 Out_LRadarBIn1;       //TIM_IN1
extern u8 Out_LRadarBIn2;       //TIM_IN2
extern u8 Out_LRadarBIn3;       //TIM_IN3
extern u8 Out_LRadarBIn4;       //TIM_IN4


extern u8 radararea;    //
extern u8 radarstop;    //
extern u8 LIMIT_1;      //下限位开关
extern u8 LIMIT_2;      //上限位开关
extern u8 LIMIT_3;
extern u8 LIMIT_4;




/**********************my_map****************************************/
extern u8 Map_fresh1;               //地图起点更新标志
extern u8 Map_fresh2;               //地图终点更新标志
//extern u8 Code_fresh1;              //码值更新标志 1//用于上位机交互
//extern u8 Code_fresh2;              //码值更新标志 2//用于计算延时距离
extern u8 Code_fresh3;              //码值更新标志 3//用于心跳自身状态管理
//extern u8 Task_fresh;               //任务更新标志
extern u32 get_startstopcode_dir[4];//地图信息
extern u8 validCode;                //有效码值







/***********************内存*********************************/
//extern int Wheelkk;      //驱动轮减速比
//extern int Trayrotkk;    //托盘旋转减速比
//extern int Trayupdownkk; //托盘升降减速比
//extern double Wheelddis;
//extern int Traygear1;    //托盘大齿轮数
//extern int Traygear2;    //托盘小齿轮数
//extern double codexkk;   //相机x机械偏差
//extern double codeykk;   //相机y机械偏差
//extern double codexykk;  //相机精度

extern signed long yspeed;
extern double ykk;
//extern signed long rot_speedh;
//extern signed long rot_speedl;

//extern signed long tray_speedh;
//extern signed long tray_speedl;

extern signed long up_speed;
extern signed long down_speed;
extern double chargedistance;
extern double charge_speed;
extern int powertimes;
extern double codedistance;
extern double rectifykk;

//extern double ratiokk;

//extern double runkk1;       //修正系数
//extern double runkk2;
//extern double runkk3;
//extern double runkk4;
extern double runkk;
extern u8 BatteryAh;
//extern u8 tray_initial_step;
//extern u8 tray_initial_ok;
//extern u8 rottray_ok;

extern int wqq;
extern int wq;

extern float Voltage1;//采集的电压
extern float Voltage2;//采集的电压













extern u8 Handnum1 ;

extern u8 Ceshi[30] ;
extern u8 Electrify_En;	

extern float PulseAng_Helm;
extern float Pulsemm_Helm;
extern float F_XDis_Helm;
extern float F_YDis_Helm;
extern float F_DX_ScanLaInstall;
extern float F_DY_ScanLaInstall;

extern float Dis_AgvC_Helm;//舵轮中心距离车中心的距离
extern float Dis_LaToAgvInStall;//雷达中心相对车中心距离
extern float R_DisMin;//弧形旋转时最小半径
extern short F_Ang_HelmZerToAgvX;//舵轮的安装偏角
/****AGV基础参数信息****/

# define AgvStypeNo 1 //1-差速车;2-舵轮车;


#define PulsemmK_Helm 1.0f//轮子直径系数
# define DisK_AgvC_Helm	1.0f//舵轮中心距系数


# define Ang_LaInstall 45.0f    //雷达安装方向角度

# define Ang_LaS_AllS 45.0f    

# define Ang_DeltaMax 30.0f

# define PulseS_Circle 65535u//电机单圈脉冲量








#define Pi 3.14159f;

extern	float AngCw_Helm;
extern u8 Tim3_XCNums[1];//线程计时器

extern char F_Agvname[8];//AGV名称		A02_0112

void Value1Init(void);
void Value2Init(void);

typedef union {
u8 ConyUpTy;
u8 ConyDownTy;
}Union_u8;
extern Union_u8 Unionu8_1;
extern Union_u8 Unionu8_2;

typedef union {
u16 Weight;
}Union_u16;
extern Union_u16  Union16_1;

#endif