![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
...
Diff: fct.h
- Revision:
- 3:b91371837109
- Parent:
- 2:82b72fa8dbcd
- Child:
- 4:78a9354fcee8
--- a/fct.h Sun May 28 17:36:57 2017 +0000 +++ b/fct.h Mon May 29 12:01:43 2017 +0000 @@ -12,12 +12,12 @@ extern PwmOut MD; //vitesse moteur droit extern DigitalOut sensMG; // sens moteur gauche extern DigitalOut sensMD; // sens moteur droit -extern Timer temp,t; +extern Timer temp,t,t2; extern Ticker tic1,tic2; extern int drap,flag1,flag2,flag3,flag4,flag5; -extern float US1,US2,US3,AN1,AN2,US1_av,US2_av,US3_av,AN1_av,AN2_av; -extern float E_av,E,iE; +extern float US1,US2,US3,AN1,AN2,US1_av,US2_av,US3_av,AN1_av,AN2_av; +extern float E_av,E,iE,E0,E1,E2,E3; extern float cmdG,cmdD; extern int etat; extern float iecart,ecart_av,ecart; @@ -25,10 +25,10 @@ //CONSTANTES #define PERIOD 0.0001 -#define VMOY 30 +#define VMOY 25 #define VMAX 60 -#define Kp_E 0.42 -#define Kp_ecart 0.8 +#define Kp_dist 0.0 +#define Kp_ecart 0.2 #define Td_ecart 0.0 #define Ti_ecart 1000.0 #define limitmin 3 @@ -38,6 +38,7 @@ #define a 24.0 #define b 0.1 //PROTOTYPES +void contournement(); void stopMotor(); void suivi_mur(); void rotation_horaire();