programme ines avce xbee

Dependencies:   MMA8451Q mbed xbee_lib

Fork of Programme_course by Freescale_Cachan

Revision:
1:4a9196bcf97a
Parent:
0:3ec7fc598e48
Child:
2:ddf9879f0e25
diff -r 3ec7fc598e48 -r 4a9196bcf97a traitement_image.cpp
--- a/traitement_image.cpp	Thu Jan 26 07:37:45 2017 +0000
+++ b/traitement_image.cpp	Wed Feb 08 15:16:04 2017 +0000
@@ -11,7 +11,7 @@
     char mem_a, mem_b;
     char tab[3];
     char tab2[3];
-    mem_a = 100;
+    mem_a = 100;            
     mem_b = 100;
     save_b = MARGE_LIGNE;
     save_a = MARGE_LIGNE;
@@ -84,54 +84,6 @@
 }
 
 
-void Gestion_bosse()
-{
-    if(BOSSE_ACTIVE)//Si on active la détection de la bosse
-    {
-        static int tep = 0;
-        switch(bosse)
-        {
-            case 0:
-            led1 = 1;
-            led2 = 0;
-            break;
-            case 1:
-            led2 = 1;
-            led1= 0;
-            break;
-            case 2:
-            led3 = 1;
-            led2 = 0;
-            break;
-        }
-    
-        
-        last_three[2] = last_three[1];
-        last_three[1] = last_three[0];
-        last_three[0] = acc.getAccX();
-        
-        if(bosse == 1)
-        ajust_vitesse = 20;
-        else if(bosse == 2)
-        ajust_vitesse = -10;
-        else ajust_vitesse = 0;
-        
-        if((middle_3F(last_three) > 0.2 ) && (bosse == 0 && t_debut.read() > 2))
-        {
-            bosse = 1;
-            tep = (int)t_debut.read_ms();
-        }
-        else if(bosse == 1 && (int)t_debut.read_ms() > (tep+1000))
-        {
-            bosse = 2;
-        }
-        else if(bosse == 2 && middle_3F(last_three) > 0.98)
-        {
-            bosse = 3;
-        }
-    }
-}
-
 void T_image()
 {
     static int  last_bari = 0, bari_bis = 0;
@@ -165,7 +117,7 @@
         }
         if(abs(new_bari) >= 15 && ligne_droite > 0 && ralentire == 0)
         {
-            ralentire = 1;
+            ralentire = 1; // ralentire????????
             retiens = t_ligne.read_ms();
             t_ligne.reset();
             if(retiens > 3000) retiens = 3000;