correct SYSTICK and RELOAD_CYCLES

This commit is contained in:
2025-11-20 16:32:17 +08:00
parent a9aa2e19c8
commit a2d2773ace
7 changed files with 50 additions and 147 deletions

View File

@@ -24,8 +24,8 @@ struct _PID M1_VEL_PID = {0.4, 2, 0};
struct LOWPASS M0_VEL_Filter = {0.1};
struct LOWPASS M1_VEL_Filter = {0.1};
struct AS5600_Sensor Angle_Sensor0 = {0};
struct AS5600_Sensor Angle_Sensor1 = {1};
struct MT6701 Angle_Sensor0 = {0};
struct MT6701 Angle_Sensor1 = {1};
#define VOLTAGE_POWER_SUPPLY 12.0f
#define VOLTAGE_LIMIT 6
@@ -123,16 +123,16 @@ void Check_Sensor(void) {
void FOC_Init() {
// PWM_Init();
// CurrSense_Init();
// AS5600_Init();
// mt6701_Init();
Check_Sensor();
}
void Print_Velocity(int Motor_Velocity) {
if (Motor_Velocity == 0) {
printf("Velocity M0 is %f \n", GetVelocity(&Angle_Sensor0));
printf("M0:%f\n", GetVelocity(&Angle_Sensor0));
}
if (Motor_Velocity == 1) {
printf("Velocity M1 is %f \n", GetVelocity(&Angle_Sensor1));
printf("M1:%f\n", GetVelocity(&Angle_Sensor1));
}
}