44 lines
986 B
C
44 lines
986 B
C
#ifndef _DJI_H_
|
||
#define _DJI_H_
|
||
|
||
#include "pid.h"
|
||
#include "djiMotor.h"
|
||
|
||
|
||
typedef enum
|
||
{
|
||
MOTOR_UP = 0,
|
||
MOTOR_TURN = 1,
|
||
MOTOR_RING_RIGHT = 2,
|
||
MOTOR_RING_LEFT = 3,
|
||
MOTOR_NUM
|
||
}motorput_e;
|
||
|
||
// //电机输出
|
||
// int16_t result[MOTOR_NUM]; //速度环
|
||
// float angleSet[MOTOR_NUM]; //位置环
|
||
// //电机状态
|
||
|
||
// motor_measure_t* putMotor[MOTOR_NUM];
|
||
|
||
// //翻转3508pid
|
||
// static const float M3508_speed_PID[3];
|
||
// static const float M3508_angle_PID[3];
|
||
|
||
// //前后与夹球2006pid
|
||
// static const float M2006_speed_PID[3];
|
||
// static const float M2006_angle_PID[3];
|
||
// //电机速度pid结构体
|
||
// pid_type_def speed_pid[MOTOR_NUM];
|
||
// //位置环pid
|
||
// pid_type_def angle_pid[MOTOR_NUM];
|
||
// //暂存目标位置
|
||
// //0上下,1翻转,2前后,3夹球
|
||
// float angleSet[MOTOR_NUM];
|
||
|
||
void motor_init(void);
|
||
void motor_speed(fp32 speed);
|
||
void motor_pos(fp32 angle);
|
||
|
||
#endif
|