Divide the slider into four areas

Dependents:   JeSuisUnGrandHomme

Fork of info1 by Guillaume Alli

Revision:
2:68deb4a53d73
Parent:
1:6bd5a7965b66
Child:
3:9f876f7e54c3
--- a/info1.cpp	Tue Jan 13 08:03:57 2015 +0000
+++ b/info1.cpp	Thu Jan 15 10:28:08 2015 +0000
@@ -14,15 +14,22 @@
 
 void appui_ana (int *bp1,int *bp2,float seuil)
 {
+    
+    
     if (tsi2.readPercentage()>0 && tsi2.readPercentage()<seuil)
     {
         *bp1=1;
         *bp2=0;
     }
     
-    if (tsi2.readPercentage()>=seuil && tsi2.readPercentage()<=1)
+    else if (tsi2.readPercentage()>=seuil && tsi2.readPercentage()<=1)
     {
         *bp1=0;
         *bp2=1;
     }
+    else
+    {
+        *bp1=0;
+        *bp2=0;
+    }
 }