fix(algorithm): 修改FOC控制器中的角度计算和校准参数
修正了FOC控制器中电气角度计算的符号错误(减法改为加法), 移除了不必要的空行,并优化了velocity_open_loop函数中的注释 格式。同时修正了角度控制中PID计算的目标角度差值顺序。 BREAKING CHANGE: 角度校准参数从硬编码值改为配置常量。
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user