hallo

Dependencies:   Servo mbed pixy

Fork of PES1 by Gruppe 3

Revision:
20:a90e5b54bf7b
Parent:
19:adae367247d4
Child:
21:69ee872b8ee9
--- a/readCamera.cpp	Fri May 12 12:25:34 2017 +0000
+++ b/readCamera.cpp	Sat May 13 16:50:57 2017 +0000
@@ -26,7 +26,7 @@
                 //printf("%f y\n", yAxis);
                 //printf("%f x\n", xAxis);
 
-                if(yAxis < yLimit && yAxis > 30) {
+                if(yAxis < yLimit) {
 
                     if (xAxis < 130) {                                  // links fahren
                         distance = (129 - xAxis)*(99.0/129.0);
@@ -54,19 +54,20 @@
                         state = 400;
                     }
                 }
-                if(yAxis <= 20) {                                       // Zone mit vielen Fehlern
+                /*if(yAxis <= 20) {                                       // Zone mit vielen Fehlern
                     state = 0;                                          // deshalb wird alles, was dort drin ist als "kein Klotz in Sichtweite"" gewertet 
-                }
+                }*/
             }
             i = 0;
+            k = 0;
         }
     } else {
         k++;
-        if (k % 5 == 0) {
+        if (k % 20 == 0) {
             k = 0;
             state = 0;                                                  // kein Klotz in Sichtweite
         }
     }
-    printf("%f\n\r",state);
+    //printf("%f\n\r",state);
     return state;
 }
\ No newline at end of file