BoooomFOC_STSPIN32G4_EVB/BoooomCTL/Data/Angle/Angle.c

32 lines
510 B
C
Raw Normal View History

2024-05-08 03:04:20 +08:00
//
// Created by ZK on 2023/3/14.
//
#include "Angle.h"
//#define EncoderName MT6816
float32_t getAngle_MT6816() {
// printf("Test");
return M_PI;
}
float32_t getAngle_AS5600() {
// printf("Test");
return 0.0f;
}
bool Data_Init(tData *data) {
switch (data->Angle.EncoderModel) {
case MT6816:
data->Angle.getAngle = getAngle_MT6816;
break;
case AS5600:
data->Angle.getAngle = getAngle_AS5600;
break;
}
return 0;
}