重构bsp层,bsp层将和HAL的配置一致,修改CubeMX之后不需要修改bsp。重构bmi088。

This commit is contained in:
NeoZng
2022-12-30 23:39:04 +08:00
parent ab1a9726b1
commit a3631a5ca5
39 changed files with 842 additions and 256 deletions

View File

@@ -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)))

View File

@@ -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();
}

View File

@@ -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();