first commit
This commit is contained in:
19
APP/mymain.c
19
APP/mymain.c
@ -20,25 +20,20 @@ void mymain()
|
||||
while(i<3300*3)
|
||||
{
|
||||
Angel_closed_loop(motorx,&FOCStruct_X,-0.2);
|
||||
Angel_closed_loop(motory,&FOCStruct_Y,0.7);
|
||||
Angel_closed_loop(motory,&FOCStruct_Y,2.3);
|
||||
i++;
|
||||
}
|
||||
LED_ON;
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
MpuGetData();//
|
||||
|
||||
|
||||
|
||||
MpuGetData();
|
||||
GetAngle(&ICM42688,&Angle);
|
||||
x = Angle.pitch;
|
||||
y = Angle.roll ;
|
||||
// Zitai_closed_loop(motorx,&FOCStruct_X,x);
|
||||
// Zitai_closed_loop(motory,&FOCStruct_Y,-y);
|
||||
// x = getAngle(motorx);
|
||||
// y = getAngle(motory);
|
||||
Zitai_closed_loop(motorx,&FOCStruct_X,x);
|
||||
Zitai_closed_loop(motory,&FOCStruct_Y,-y);
|
||||
x = getAngle(motorx);
|
||||
y = getAngle(motory);
|
||||
// printf("%fY%f\n",x,y);
|
||||
// speed_closed_loop(motorx,&FOCStruct_X,_2PI*5);
|
||||
// speed_closed_loop(motory,&FOCStruct_Y,_2PI*2);
|
||||
@ -49,7 +44,7 @@ void mymain()
|
||||
// }
|
||||
// i++;
|
||||
//
|
||||
Data_send(x,y,0,0);
|
||||
// Data_send(x,y,0,0);
|
||||
// HAL_Delay(3);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user