QRcode.h 1.35 KB
#ifndef __QRCODE_H
#define __QRCODE_H
#include "bsp.h"

typedef struct
{
	float setSpeed;
	float encodeSpeed;
	int voltage;
	short enable;
	float speedSlope;
	int initStep;
	
}KincoStructInfo;
typedef struct
{
	float palstance;
	float angle;
	float angleCompensation;
}IMUdata;
typedef struct
{
	u8 initState;//速度模式初始化步骤
	float setSpeed;//目标速度
	float setPos;//设置目标位置
	float encodePos;//反馈实际位置
	u8 		runState;//举升运动状态
	int 	liftState;//-1原点  1最高点 0过程中
	u16		errorState[4];//报警状态
}LifterStructInfo;

extern LifterStructInfo Lifter1;

typedef struct
{
	u8 initState;
	float setSpeed;
	float encodeSpeed;
	float encodeAngle;//旋转角度
	int 	voltage;
	short enable;
	u8 		runState;//旋转运动状态
	int 	rotateState;
	int 	turnAngle;
	u16		errorState[4];//报警状态
}RotateStructInfo;

extern RotateStructInfo Rotate1;

typedef struct
{
	u8 startFlag;
	float setSpeed;
	float encodeSpeed;
	int voltage;
	short enable;
	float speedSlope;
	int initStep;
	float angleNum;
	int encodeAngleNum;
	float compensationCoefficient;
}TongYiStructInfo;

extern TongYiStructInfo TongyiStruct1,TongyiStruct2,TongyiStruct3,TongyiStruct4,TongyiStruct5;


extern IMUdata IMU;

extern void pathUpdate(u8 *CurrentID);
extern void getPosAngleOffset(float *PosOffset,float *Theta);
extern KincoStructInfo KincoStruct1,KincoStruct2;
extern void QRcodeNavigation();

#endif