32 lines
507 B
C
32 lines
507 B
C
#ifndef _GO_H_
|
||
#define _GO_H_
|
||
|
||
#include "GO_M8010_6_Driver.h"
|
||
|
||
typedef enum{
|
||
GIMBAL = 0,
|
||
TURN = 1,
|
||
OTHER = 2
|
||
}GO_ID_t;
|
||
|
||
typedef struct
|
||
{
|
||
/* data */
|
||
GO_Motorfield* goData[GO_NUM];
|
||
//暂存目标位置
|
||
//0 left,1 right
|
||
float angleSetgo[GO_NUM];
|
||
float offestAngle[GO_NUM];//go数据
|
||
float Kp;
|
||
float Kd;
|
||
float allowRange;
|
||
}GO;
|
||
|
||
void GO_Init(void);
|
||
void gimbalFlow(void);
|
||
void gimbalZero(void);
|
||
void GO_TURN_ball(GO_ID_t go_id,GO go_set,int angle);
|
||
|
||
|
||
#endif
|