![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ROBOTIC COMPETITION PARIS 2017
Fork of _test_suivi_mur by
fct.h@12:6151eb503170, 2017-06-01 (annotated)
- Committer:
- syasya
- Date:
- Thu Jun 01 09:30:37 2017 +0000
- Revision:
- 12:6151eb503170
- Parent:
- 11:cb477f6ec781
- Child:
- 13:4fdd8ad91c69
probleme t3
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vermaelen | 2:82b72fa8dbcd | 1 | #ifndef FCT_H |
vermaelen | 2:82b72fa8dbcd | 2 | #define FCT_H |
syasya | 7:64bfecbb3000 | 3 | |
syasya | 7:64bfecbb3000 | 4 | #include "CMPS03.h" |
syasya | 7:64bfecbb3000 | 5 | #include "mbed.h" |
syasya | 7:64bfecbb3000 | 6 | |
vermaelen | 2:82b72fa8dbcd | 7 | //GLOBALES |
vermaelen | 2:82b72fa8dbcd | 8 | extern BusOut leds; |
syasya | 10:1a69a6f659bd | 9 | extern DigitalIn jack; |
vermaelen | 2:82b72fa8dbcd | 10 | extern DigitalOut trigger1; |
vermaelen | 2:82b72fa8dbcd | 11 | extern DigitalOut trigger2; |
vermaelen | 2:82b72fa8dbcd | 12 | extern DigitalOut trigger3; |
vermaelen | 2:82b72fa8dbcd | 13 | extern InterruptIn echo; |
vermaelen | 2:82b72fa8dbcd | 14 | extern AnalogIn AnaG; |
vermaelen | 2:82b72fa8dbcd | 15 | extern AnalogIn AnaAV; |
vermaelen | 2:82b72fa8dbcd | 16 | extern PwmOut MG; //vitesse moteur gauche |
vermaelen | 2:82b72fa8dbcd | 17 | extern PwmOut MD; //vitesse moteur droit |
vermaelen | 2:82b72fa8dbcd | 18 | extern DigitalOut sensMG; // sens moteur gauche |
vermaelen | 2:82b72fa8dbcd | 19 | extern DigitalOut sensMD; // sens moteur droit |
syasya | 7:64bfecbb3000 | 20 | extern Timer temp,t,t2,t3; |
vermaelen | 2:82b72fa8dbcd | 21 | extern Ticker tic1,tic2; |
syasya | 7:64bfecbb3000 | 22 | extern CMPS03 boussole; |
vermaelen | 2:82b72fa8dbcd | 23 | |
syasya | 7:64bfecbb3000 | 24 | |
syasya | 11:cb477f6ec781 | 25 | extern int etat,t_set; |
vermaelen | 2:82b72fa8dbcd | 26 | extern int drap,flag1,flag2,flag3,flag4,flag5; |
vermaelen | 3:b91371837109 | 27 | extern float US1,US2,US3,AN1,AN2,US1_av,US2_av,US3_av,AN1_av,AN2_av; |
syasya | 7:64bfecbb3000 | 28 | extern float E_av,E,iE,E0,E1; |
vermaelen | 2:82b72fa8dbcd | 29 | extern float cmdG,cmdD; |
vermaelen | 2:82b72fa8dbcd | 30 | extern float iecart,ecart_av,ecart; |
syasya | 7:64bfecbb3000 | 31 | extern float bearing,bearing_set; |
vermaelen | 2:82b72fa8dbcd | 32 | |
vermaelen | 2:82b72fa8dbcd | 33 | |
vermaelen | 2:82b72fa8dbcd | 34 | //CONSTANTES |
vermaelen | 2:82b72fa8dbcd | 35 | #define PERIOD 0.0001 |
syasya | 10:1a69a6f659bd | 36 | #define VMAX 30 |
syasya | 7:64bfecbb3000 | 37 | #define VLIMIT 70 |
vermaelen | 4:78a9354fcee8 | 38 | #define Kp_dist 0.2 |
vermaelen | 5:3746060957fb | 39 | #define Kp_ecart 0.22 |
vermaelen | 2:82b72fa8dbcd | 40 | #define a 24.0 |
vermaelen | 2:82b72fa8dbcd | 41 | #define b 0.1 |
syasya | 7:64bfecbb3000 | 42 | |
vermaelen | 2:82b72fa8dbcd | 43 | //PROTOTYPES |
syasya | 9:7f62c0329849 | 44 | void en_avant(); |
syasya | 7:64bfecbb3000 | 45 | void start_trig(); |
syasya | 7:64bfecbb3000 | 46 | void stop_trig(); |
syasya | 7:64bfecbb3000 | 47 | void stop(); |
vermaelen | 2:82b72fa8dbcd | 48 | void init(); |
syasya | 7:64bfecbb3000 | 49 | void suivi_mur(); |
syasya | 7:64bfecbb3000 | 50 | void contournement(); |
syasya | 7:64bfecbb3000 | 51 | void rotation_horaire(); |
syasya | 12:6151eb503170 | 52 | void rotation_sharp(); |
vermaelen | 2:82b72fa8dbcd | 53 | void fcttrig(); |
vermaelen | 2:82b72fa8dbcd | 54 | void mesAN(); |
vermaelen | 2:82b72fa8dbcd | 55 | |
syasya | 7:64bfecbb3000 | 56 | float vitesse(float); |
syasya | 7:64bfecbb3000 | 57 | |
syasya | 11:cb477f6ec781 | 58 | |
vermaelen | 2:82b72fa8dbcd | 59 | #endif |