fix(algorithm): 修改FOC控制器中的角度计算和校准参数

修正了FOC控制器中电气角度计算的符号错误(减法改为加法),
移除了不必要的空行,并优化了velocity_open_loop函数中的注释
格式。同时修正了角度控制中PID计算的目标角度差值顺序。

BREAKING CHANGE: 角度校准参数从硬编码值改为配置常量。
This commit is contained in:
cbb
2026-05-17 03:54:26 +08:00
parent d6f784db60
commit e95673fc4e
5 changed files with 10 additions and 1428 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ int spi_rw_half_word_dma(uint32_t spi_periph, uint16_t tx_data,
class angle_sensor {
public:
float calibration_angle = 195.0f;
float calibration_angle = ANGLESENS_CALIBRATION_ANGLE;
u8 init(void);
float read_sensorAngle(void);
float update(void);