feat(DengFOC):
新增了基于三相电流采样的dq轴电流计算函数`cal_Iq_Id`
调整了开环控制中的电压限制逻辑
更新了默认电源电压值为24V。
KHT7823测试代码
```
This commit is contained in:
cbb
2025-10-30 20:20:14 +08:00
parent 5d14731af5
commit 180a46271c
10 changed files with 318 additions and 364 deletions
+2 -3
View File
@@ -15,7 +15,6 @@
#include <cstdio>
// 全局变量定义
CurrentKalman kalman(0.0f, 0.0026f, 4.8f, 0.0001f, 1e-6f, 0.02f);
CAN_transmiter CAN0_transmiter;
FOC_Controlroller FOC;
sampler sampler;
@@ -29,14 +28,14 @@ int main(void) {
sampler.init(); // 采样器初始化
driver_init(); // 电机驱动初始化
tle5012b_gpio_init(); // TLI5012B初始化
tle5012b_spi_init();
KHT7823_init();
watchdog_init(5000);
while (1) {
/* clear the FWDGT reset flag */
// std::printf("1\n");
// KHT7823_init();
fwdgt_counter_reload();
CAN0_transmiter.communication_check();
}