go/User/module/dji.h
2025-03-03 19:41:03 +08:00

44 lines
986 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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