![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ROBOTIC COMPETITION PARIS 2017
Fork of _test_suivi_mur by
Diff: fct.h
- Revision:
- 7:64bfecbb3000
- Parent:
- 6:5f7df5c74a77
- Child:
- 9:7f62c0329849
diff -r 5f7df5c74a77 -r 64bfecbb3000 fct.h --- a/fct.h Wed May 31 08:48:23 2017 +0000 +++ b/fct.h Wed May 31 12:17:59 2017 +0000 @@ -1,5 +1,9 @@ #ifndef FCT_H #define FCT_H + +#include "CMPS03.h" +#include "mbed.h" + //GLOBALES extern BusOut leds; extern DigitalOut trigger1; @@ -12,43 +16,40 @@ extern PwmOut MD; //vitesse moteur droit extern DigitalOut sensMG; // sens moteur gauche extern DigitalOut sensMD; // sens moteur droit -extern Timer temp,t,t2; +extern Timer temp,t,t2,t3; extern Ticker tic1,tic2; +extern CMPS03 boussole; + +extern int etat; 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,E0,E1,E2,E3; +extern float E_av,E,iE,E0,E1; extern float cmdG,cmdD; -extern int etat; extern float iecart,ecart_av,ecart; +extern float bearing,bearing_set; //CONSTANTES #define PERIOD 0.0001 -#define VMOY 45 -#define VMAX 70 +#define VMAX 45 +#define VLIMIT 70 #define Kp_dist 0.2 #define Kp_ecart 0.22 -#define Td_ecart 0.0 -#define Ti_ecart 1000.0 -#define limitmin 3 -#define limitmax 150 -#define Te 0.001 -#define Ti 2.0 #define a 24.0 #define b 0.1 + //PROTOTYPES -void contournement(); -void stopMotor(); -void suivi_mur(); -void rotation_horaire(); +void start_trig(); +void stop_trig(); +void stop(); void init(); -void asservissement(); +void suivi_mur(); +void contournement(); +void rotation_horaire(); void fcttrig(); -float vitesse(float); -void start(); -void stop(); -float vitesse(float); void mesAN(); +float vitesse(float); + #endif