云台跟随,连续发射

This commit is contained in:
chenfu
2024-05-20 22:22:24 +08:00
parent 4f80821435
commit 0c0d1201ea
12 changed files with 658 additions and 193 deletions

View File

@@ -4,16 +4,21 @@
#include "dji_motor.h"
#include "step_motor.h"
#include "servo_motor.h"
#include "dji_motor.h"
#include "robot_def.h"
void MotorControlTask()
{
// static uint8_t cnt = 0; 设定不同电机的任务频率
// if(cnt%5==0) //200hz
// if(cnt%10==0) //100hz
// DJIMotorControl();
/* 如果有对应的电机则取消注释,可以加入条件编译或者register对应的idx判断是否注册了电机 */
#ifdef GIMBAL_BOARD
DJIMotorControl();
#endif // DEBUG
#ifdef CHASSIS_BOARD
LKMotorControl();
#endif // DEBUG
/* 如果有对应的电机则取消注释,可以加入条件编译或者register对应的idx判断是否注册了电机 */
//LKMotorControl();
// legacy support
// 由于ht04电机的反馈方式为接收到一帧消息后立刻回传,以此方式连续发送可能导致总线拥塞