TRR2018 omar

Dependencies:   mbed

Fork of biniou by TRR 2018

Revision:
8:1d8c3ca5e508
Child:
11:bc24b3ba51a9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stateMachines.h	Sat Sep 08 22:17:15 2018 +0000
@@ -0,0 +1,59 @@
+#import <mbed.h>
+#include <stdint.h>
+
+typedef enum{
+    ARRET,
+    LOADING_SECTION,
+    RUNNING_SECTION
+}SECTION_ST;
+
+typedef enum{
+    UNDER_SPEED,
+    OVER_SPEED,
+    AT_SPEED
+}THROTTLE_ST;
+
+typedef enum{
+    MUR_G_KO,
+    MUR_D_KO,
+    MUR_GD_OK
+}MUR_ST;
+
+typedef enum{
+    LONG_RANGE_CLEAR,
+    LONG_RANGE_WARNING,
+    DEV_WARNING,
+    FREINAGE_URG
+}OBSTACLE_ST;
+
+typedef struct s_section {
+   int target_speed_cmps;
+   int ns_accel;
+   int ns_decel;
+   int lng_section_cm;
+   int coef_p;
+   int coef_i;
+   int coef_d;
+   s_section* nextSection;
+}s_Section;
+
+
+//gestion de la direction quand la vue est dégagée
+void murs_init(void);
+void murs_update(void);
+void murs_output(void);
+
+//gestion de la direction en mode course et de l'évitement en mode DLVV
+void obstacle_init(void);
+void obstacle_update(void);
+void obstacle_output(void);
+
+//gestion du comportement   en fn de l'avancement sur le parcours
+void section_init(void);
+void section_update(void);
+void section_output(void);
+
+//gestion de l'allure en fonction des paramètres de la section
+void throttle_init(void);
+void throttle_update(void);
+void throttle_output(void);