2023/3/13第五次参数飞行测试

This commit is contained in:
2024-03-14 16:50:56 +08:00
parent 6e701f3ae8
commit c1b5b5fa04
8 changed files with 881 additions and 902 deletions

View File

@ -24,9 +24,11 @@ typedef struct
double Angle_Prev;
unsigned long Time_Prev;
}FOCTypeDef;
extern FOCTypeDef FOCStruct_X;
extern FOCTypeDef FOCStruct_Y;
void setPhaseVoltage(unsigned char motor,float Uq, float Ud, double angle_el);
int alignSensor(unsigned char moto,FOCTypeDef * FOCStruct);
void PID_Iint(void);
double _normalizeAngle(float angle);
@ -34,7 +36,10 @@ double LPF_velocity(double x,FOCTypeDef *FOCStruct);
void speed_closed_loop(unsigned motor,FOCTypeDef *FOCStruct,float V_Target);
void Zitai_closed_loop(unsigned motor,FOCTypeDef *FOCStruct,float ZT_Error);
void Angel_closed_loop(unsigned motor,FOCTypeDef *FOCStruct,float Angle_target);
void moto_gpio_init();
void PWM_Start();
void moto_Init();
#endif //FOC_N_FOC_H