thijs ruikes / Mbed 2 deprecated PROJECT-ROBOTCONTROL-KNOPJES

Dependencies:   Encoder HIDScope MODSERIAL mbed

Revision:
3:435dbacaaeb8
Parent:
2:41b58289fed5
Child:
4:7aa6bb892157
--- a/main.cpp	Fri Nov 14 07:50:39 2014 +0000
+++ b/main.cpp	Fri Nov 14 09:03:00 2014 +0000
@@ -485,11 +485,11 @@
         groen = 1;*/
     } else if (y1>0 && y2>0) {
         check=1;
-    } else if (y1>0) {
+    } else if (y1>0 && stand<2) {
         stand=stand+1;
         check=0;
         cout<<"stand "<<stand<<endl;
-    } else if (y2>0 ) {
+    } else if (y2>0 && stand>0) {
         stand=stand-1;
         check=0;
         cout<<"stand "<<stand<<endl;