Raynaud Gilles
/
VITI_motor_angle_3
angle3
Diff: main.cpp
- Revision:
- 7:f5c5cf499311
- Parent:
- 6:65c511f6f1fc
- Child:
- 8:41752698aa35
--- a/main.cpp Sat May 23 10:30:02 2020 +0000 +++ b/main.cpp Sat May 23 14:18:53 2020 +0000 @@ -67,7 +67,6 @@ a1=a0*RC*1.0; //calcul du coefficient a du filtre dt=tt.read_us()/1000000.0; tt.reset(); - //tt.start(); DOF.readAccel(); DOF.readGyro(); #if viti @@ -93,12 +92,11 @@ angle_gyroy_f=a1*gyroy+a1*gyroy_pred-b0*angle_gyroy_f_pred; // angle_final=angle_acce_f+angle_gyroy_f; - +ana=0.0; // // - ana=0.0; - wait(0.0082); + wait(0.0083); } } @@ -113,6 +111,7 @@ wait(1); DOF.calibration(); wait(1); + tt.reset(); thread.start(calcul); @@ -135,9 +134,9 @@ else motor.speed(0.0); // motor.speed(s); - pc.printf("$%6.2f %6.2f %6.2f %6.2f %6.2f %6.2f %6.2f;\r\n",ang,angle_acce_f,angle_gyroy_f,angle_final,gyroy,x,s); + pc.printf("$%6.2f %6.2f %6.2f %6.2f %6.2f %6.2f %6.2f %f;\r\n",ang,angle_acce_f,angle_gyroy_f,angle_final,gyroy,x,s,dt); ana=0.0; - wait(0.1); + wait(0.095); } }