mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
重构bsp层,bsp层将和HAL的配置一致,修改CubeMX之后不需要修改bsp。重构bmi088。
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#define MOTOR_DEF_H
|
||||
|
||||
#include "controller.h"
|
||||
#include <stdint.h>
|
||||
#include "stdint.h"
|
||||
|
||||
#define LIMIT_MIN_MAX(x, min, max) (x) = (((x) <= (min)) ? (min) : (((x) >= (max)) ? (max) : (x)))
|
||||
|
||||
|
||||
@@ -1,12 +1,25 @@
|
||||
#include "motor_task.h"
|
||||
#include "LK9025.h"
|
||||
#include "HT04.h"
|
||||
#include "dji_motor.h"
|
||||
#include "step_motor.h"
|
||||
#include "servo_motor.h"
|
||||
|
||||
|
||||
void MotorControlTask()
|
||||
{
|
||||
// static uint8_t cnt = 0; 设定任务频率
|
||||
// if(cnt%5==0) //200hz
|
||||
// if(cnt%10==0) //100hz
|
||||
|
||||
DJIMotorControl();
|
||||
|
||||
//LKMotorControl();
|
||||
|
||||
//HTMotorControl();
|
||||
|
||||
//ServeoMotorControl();
|
||||
|
||||
//StepMotorControl();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,14 +11,10 @@
|
||||
#ifndef MOTOR_TASK_H
|
||||
#define MOTOR_TASK_H
|
||||
|
||||
#include "LK9025.h"
|
||||
#include "HT04.h"
|
||||
#include "dji_motor.h"
|
||||
|
||||
// 舵机控制任务的频率设定为20Hz或更低
|
||||
// 开关式的舵机控制不应该放在该函数中
|
||||
/**
|
||||
* @brief
|
||||
* @brief 电机控制闭环任务,在RTOS中应该设定为1Khz运行
|
||||
* 舵机控制任务的频率设定为20Hz或更低
|
||||
*
|
||||
*/
|
||||
void MotorControlTask();
|
||||
|
||||
Reference in New Issue
Block a user