|
|
@@ -94,7 +94,7 @@ void foc_update(foc_t *foc) {
|
|
|
float sin_old = foc->sin;
|
|
|
float cos_old = foc->cos;
|
|
|
if (foc->mot_velocity_filterd >= CONFIG_Volvec_Delay_Comp_Start_Vel) {
|
|
|
- float vol_dq_angle = foc->in.mot_angle + foc->mot_velocity_filterd / PI * 180.0f * (foc->ts * 0.8f);
|
|
|
+ float vol_dq_angle = foc->in.mot_angle + foc->mot_vel_radusPers / PI * 180.0f * (foc->ts * 0.8f);
|
|
|
norm_angle_deg(vol_dq_angle);
|
|
|
arm_sin_cos(vol_dq_angle, &foc->sin, &foc->cos);
|
|
|
}
|