新增 EncoderAngleKalman 类以处理编码器角度噪声,改善角度反馈质量,并配合速度滤波器提供更准确的速度估算。 perf(CAN): 优化CAN数据打包与状态标识字段 改进 pack_u16_to_bytes 等函数实现方式,使用 reinterpret_cast 提高效率; 扩展 Status_code 为多个独立状态位,增强诊断能力。 feat(FOC): 添加电机锁止和停止功能 新增 drv_stop 和 drv_hold 方法用于控制电机占空比,支持紧急制动与角度保持。优化了FOC控制器的接口设计,提升安全性和可控性。 fix(filter): 修正中值滤波器数组大小动态分配问题 将 medium_filter 函数中的排序数组改为使用传入参数 size 动态定义,避免固定大小带来的资源浪费或越界风险,提高滤波精度和稳定性。 chore(project): 移除冗余文件及代码清理 移除了 thermal.cpp/h 文件及相关引用,调整项目结构,删除未使用的全局变量定义、注释和头文件包含,精简系统初始化流程。
77 lines
2.2 KiB
YAML
77 lines
2.2 KiB
YAML
project:
|
|
groups:
|
|
- group: Source Files
|
|
files:
|
|
- file: main.h
|
|
- file: main.cpp
|
|
- group: sys
|
|
files:
|
|
- file: sys/systick.cpp
|
|
- file: sys/systick.h
|
|
- file: sys/initial.cpp
|
|
- file: sys/initial.h
|
|
- file: sys/health.h
|
|
- file: sys/health.cpp
|
|
- group: device
|
|
files:
|
|
- file: device/Can.cpp
|
|
- file: device/Can.h
|
|
- file: device/ang_sensor.cpp
|
|
- file: device/ang_sensor.h
|
|
- file: device/ADC.cpp
|
|
- file: device/adc.h
|
|
- file: device/Timer.cpp
|
|
- file: device/Timer.h
|
|
- file: device/test.cpp
|
|
- group: Algorithm
|
|
files:
|
|
- file: Algorithm/Filter.cpp
|
|
- file: Algorithm/Filter.h
|
|
- file: Algorithm/DengFOC.cpp
|
|
- file: Algorithm/DengFOC.h
|
|
- file: Algorithm/pid.cpp
|
|
- file: pid.h
|
|
components:
|
|
- component: ARM::CMSIS:CORE
|
|
- component: Device:Startup
|
|
- component: Device:GD32C10x_StdPeripherals:ADC
|
|
- component: Device:GD32C10x_StdPeripherals:CAN
|
|
- component: Device:GD32C10x_StdPeripherals:DMA
|
|
- component: Device:GD32C10x_StdPeripherals:EXTI
|
|
- component: Device:GD32C10x_StdPeripherals:FMC
|
|
- component: Device:GD32C10x_StdPeripherals:GPIO
|
|
- component: Device:GD32C10x_StdPeripherals:MISC
|
|
- component: Device:GD32C10x_StdPeripherals:PMU
|
|
- component: Device:GD32C10x_StdPeripherals:RCU
|
|
- component: Device:GD32C10x_StdPeripherals:SPI_I2S
|
|
- component: Device:GD32C10x_StdPeripherals:TIMER
|
|
- component: Device:GD32C10x_StdPeripherals:USART
|
|
- component: Device:GD32C10x_libopt
|
|
- component: Device:GD32C10x_StdPeripherals:DBG
|
|
- component: Device:EVAL:GD32C10x
|
|
- component: Device:GD32C10x_StdPeripherals:FWDGT
|
|
- component: Device:GD32C10x_StdPeripherals:WWDGT
|
|
output:
|
|
type:
|
|
- elf
|
|
- hex
|
|
- map
|
|
packs:
|
|
- pack: ARM::CMSIS
|
|
- pack: GigaDevice::GD32C10x_DFP
|
|
misc:
|
|
- for-compiler: AC6
|
|
C-CPP:
|
|
- -fshort-enums
|
|
- -fshort-wchar
|
|
- -D__MICROLIB
|
|
- -Wno-register
|
|
C:
|
|
- -D__packed=packed
|
|
ASM:
|
|
- -D__packed=packed
|
|
- -D__MICROLIB
|
|
Link:
|
|
- --library_type=microlib
|
|
- --entry=Reset_Handler
|