7Robot_Freescale / Mbed 2 deprecated freescal_cup_k22f

Dependencies:   mbed freescal_cup_k22f

Dependents:   freescal_cup_k22f

Revision:
23:fa834aa184e0
Parent:
22:b5a3688e144b
Child:
24:7b04db280873
--- a/source/main.cpp	Sat Jan 17 18:06:33 2015 +0000
+++ b/source/main.cpp	Sat Jan 17 18:15:32 2015 +0000
@@ -73,7 +73,7 @@
         }  
         for (int j=indexMin; j<=indexMax; j++)
         {      
-            if (pixel1[j]<pixel2[min_detect2])
+            if (pixel2[j]<pixel2[min_detect2])
             {
                 min_detect2=j;
             }    
@@ -87,8 +87,8 @@
         }
         else
         {
-            consigne_moteur_1=7*(1-(64-max_detect)/100.);
-            consigne_moteur_2=7*(1-(64-max_detect)/150.); 
+            consigne_moteur_1=6*(1-(64-max_detect)/100.);
+            consigne_moteur_2=6*(1-(64-max_detect)/150.); 
         }
         // Lecture du potentiometre
         Kp_servo=2.0*pot1.read_u16()/65000.0;