version fin de projet S4P Manon Roussey et Stéphane Padrao Dos Santos

Dependencies:   DATA_LOGGER INTERFACE SDFileSystem X_NUCLEO_IKS01A1 mbed-dev

Files at this revision

API Documentation at this revision

Comitter:
Manon_rsy
Date:
Thu Oct 26 14:06:46 2017 +0000
Parent:
4:ad756d20fefc
Commit message:
;

Changed in this revision

INTERFACE.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ad756d20fefc -r 5cf916a81352 INTERFACE.lib
--- a/INTERFACE.lib	Thu Oct 26 14:01:13 2017 +0000
+++ b/INTERFACE.lib	Thu Oct 26 14:06:46 2017 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/users/Manon_rsy/code/INTERFACE/#85c4ec133b1b
+https://os.mbed.com/users/Manon_rsy/code/INTERFACE/#41f5521feedb
diff -r ad756d20fefc -r 5cf916a81352 main.cpp
--- a/main.cpp	Thu Oct 26 14:01:13 2017 +0000
+++ b/main.cpp	Thu Oct 26 14:06:46 2017 +0000
@@ -3,7 +3,6 @@
 #include "x_nucleo_iks01a1.h"
 #include "INTERFACE.h"
 #include "DATA_LOGGER.h"
-#include "TIMER_LIB.h"
 #include "math.h"
 
 #define FLIGHMODE 1 // à 0 il n'y à aucun affichage sur tera term
@@ -11,12 +10,11 @@
 
 bool canlog = 0;
 void INTERRUPTION(void);
-bool dolog = 0;
 DigitalOut L0(LED1);  // led L0
 void automate();
 
 short LO=0;
-Timer TIMER_EJECTION;
+Timer TIMER_SEPARATION;
 Timer TIMER_PARACHUTE;
 short leds;
 short erreur;
@@ -33,7 +31,7 @@
 
 void automate(void){
     
-    typedef enum {TEST=0, COUNT=1, WAIT_EJECTION=2, EJECTION=3, WAIT_PARACHUTE=4, PARACHUTE=5, AUTO_PILOTE=6, LED=7, ARRET=8} type_etat;
+    typedef enum {TEST=0, COUNT=1, WAIT_SEPARATION=2, EJECTION=3, WAIT_PARACHUTE=4, PARACHUTE=5, AUTO_PILOTE=6, LED=7, ARRET=8} type_etat;
     type_etat etat_actuel;
     static type_etat etat_futur=TEST;
     // gestion des entrees
@@ -49,11 +47,11 @@
         case COUNT :
             
             
-            if (LO==1) etat_futur = WAIT_EJECTION;
+            if (LO==1) etat_futur = WAIT_SEPARATION;
             break;
-        case WAIT_EJECTION :
+        case WAIT_SEPARATION :
         
-             if(TIMER_EJECTION.read()>5) {
+             if(TIMER_SEPARATION.read()>5) {
                 etat_futur = EJECTION;   //66s IRL
                 }
             break;
@@ -92,14 +90,14 @@
         case COUNT :
             COUNTDOWN();                       
             break;
-        case WAIT_EJECTION :
+        case WAIT_SEPARATION :
             canlog = 1;
-            TIMER_EJECTION.start();
+            TIMER_SEPARATION.start();
             break;
         case EJECTION :
             FCT_EJECTION();
-            TIMER_EJECTION.stop();
-            TIMER_EJECTION.reset();        
+            TIMER_SEPARATION.stop();
+            TIMER_SEPARATION.reset();        
             break;
         case WAIT_PARACHUTE :
             TIMER_PARACHUTE.start();