mirror of
https://github.com/avem-labs/Avem.git
synced 2023-09-01 15:18:49 +08:00
[MOD]: Take the pid struct outside of main function
This commit is contained in:
parent
9539658151
commit
7738691880
20
src/main.c
20
src/main.c
@ -100,15 +100,6 @@ void uart_task() {
|
||||
SixAxis sourceData;
|
||||
#endif
|
||||
|
||||
void mpu_task() {
|
||||
while(1) {
|
||||
MPU6050_getStructData(&sourceData);
|
||||
Comput(sourceData);
|
||||
vTaskDelay(50);
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
// float InnerLast; //保存内环旧值以便后向差分
|
||||
// float OutterLast; //保存外环旧值以便后向差分
|
||||
// float *Feedback; //反馈数据, 实时的角度数据
|
||||
@ -131,6 +122,17 @@ int main() {
|
||||
.Gyro = &sourceData.gX,
|
||||
};
|
||||
|
||||
void mpu_task() {
|
||||
while(1) {
|
||||
MPU6050_getStructData(&sourceData);
|
||||
Comput(sourceData);
|
||||
vTaskDelay(10);
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
|
||||
//Brushless motor auto init
|
||||
MOTOR_SETTING();
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user