![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
TRR2018 omar
Fork of biniou by
stateMachines.h@8:1d8c3ca5e508, 2018-09-08 (annotated)
- Committer:
- GaspardD
- Date:
- Sat Sep 08 22:17:15 2018 +0000
- Revision:
- 8:1d8c3ca5e508
- Child:
- 11:bc24b3ba51a9
on simplifie le shmilblik
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
GaspardD | 8:1d8c3ca5e508 | 1 | #import <mbed.h> |
GaspardD | 8:1d8c3ca5e508 | 2 | #include <stdint.h> |
GaspardD | 8:1d8c3ca5e508 | 3 | |
GaspardD | 8:1d8c3ca5e508 | 4 | typedef enum{ |
GaspardD | 8:1d8c3ca5e508 | 5 | ARRET, |
GaspardD | 8:1d8c3ca5e508 | 6 | LOADING_SECTION, |
GaspardD | 8:1d8c3ca5e508 | 7 | RUNNING_SECTION |
GaspardD | 8:1d8c3ca5e508 | 8 | }SECTION_ST; |
GaspardD | 8:1d8c3ca5e508 | 9 | |
GaspardD | 8:1d8c3ca5e508 | 10 | typedef enum{ |
GaspardD | 8:1d8c3ca5e508 | 11 | UNDER_SPEED, |
GaspardD | 8:1d8c3ca5e508 | 12 | OVER_SPEED, |
GaspardD | 8:1d8c3ca5e508 | 13 | AT_SPEED |
GaspardD | 8:1d8c3ca5e508 | 14 | }THROTTLE_ST; |
GaspardD | 8:1d8c3ca5e508 | 15 | |
GaspardD | 8:1d8c3ca5e508 | 16 | typedef enum{ |
GaspardD | 8:1d8c3ca5e508 | 17 | MUR_G_KO, |
GaspardD | 8:1d8c3ca5e508 | 18 | MUR_D_KO, |
GaspardD | 8:1d8c3ca5e508 | 19 | MUR_GD_OK |
GaspardD | 8:1d8c3ca5e508 | 20 | }MUR_ST; |
GaspardD | 8:1d8c3ca5e508 | 21 | |
GaspardD | 8:1d8c3ca5e508 | 22 | typedef enum{ |
GaspardD | 8:1d8c3ca5e508 | 23 | LONG_RANGE_CLEAR, |
GaspardD | 8:1d8c3ca5e508 | 24 | LONG_RANGE_WARNING, |
GaspardD | 8:1d8c3ca5e508 | 25 | DEV_WARNING, |
GaspardD | 8:1d8c3ca5e508 | 26 | FREINAGE_URG |
GaspardD | 8:1d8c3ca5e508 | 27 | }OBSTACLE_ST; |
GaspardD | 8:1d8c3ca5e508 | 28 | |
GaspardD | 8:1d8c3ca5e508 | 29 | typedef struct s_section { |
GaspardD | 8:1d8c3ca5e508 | 30 | int target_speed_cmps; |
GaspardD | 8:1d8c3ca5e508 | 31 | int ns_accel; |
GaspardD | 8:1d8c3ca5e508 | 32 | int ns_decel; |
GaspardD | 8:1d8c3ca5e508 | 33 | int lng_section_cm; |
GaspardD | 8:1d8c3ca5e508 | 34 | int coef_p; |
GaspardD | 8:1d8c3ca5e508 | 35 | int coef_i; |
GaspardD | 8:1d8c3ca5e508 | 36 | int coef_d; |
GaspardD | 8:1d8c3ca5e508 | 37 | s_section* nextSection; |
GaspardD | 8:1d8c3ca5e508 | 38 | }s_Section; |
GaspardD | 8:1d8c3ca5e508 | 39 | |
GaspardD | 8:1d8c3ca5e508 | 40 | |
GaspardD | 8:1d8c3ca5e508 | 41 | //gestion de la direction quand la vue est dégagée |
GaspardD | 8:1d8c3ca5e508 | 42 | void murs_init(void); |
GaspardD | 8:1d8c3ca5e508 | 43 | void murs_update(void); |
GaspardD | 8:1d8c3ca5e508 | 44 | void murs_output(void); |
GaspardD | 8:1d8c3ca5e508 | 45 | |
GaspardD | 8:1d8c3ca5e508 | 46 | //gestion de la direction en mode course et de l'évitement en mode DLVV |
GaspardD | 8:1d8c3ca5e508 | 47 | void obstacle_init(void); |
GaspardD | 8:1d8c3ca5e508 | 48 | void obstacle_update(void); |
GaspardD | 8:1d8c3ca5e508 | 49 | void obstacle_output(void); |
GaspardD | 8:1d8c3ca5e508 | 50 | |
GaspardD | 8:1d8c3ca5e508 | 51 | //gestion du comportement en fn de l'avancement sur le parcours |
GaspardD | 8:1d8c3ca5e508 | 52 | void section_init(void); |
GaspardD | 8:1d8c3ca5e508 | 53 | void section_update(void); |
GaspardD | 8:1d8c3ca5e508 | 54 | void section_output(void); |
GaspardD | 8:1d8c3ca5e508 | 55 | |
GaspardD | 8:1d8c3ca5e508 | 56 | //gestion de l'allure en fonction des paramètres de la section |
GaspardD | 8:1d8c3ca5e508 | 57 | void throttle_init(void); |
GaspardD | 8:1d8c3ca5e508 | 58 | void throttle_update(void); |
GaspardD | 8:1d8c3ca5e508 | 59 | void throttle_output(void); |