For IEEE Robotics

Dependencies:   Adafruit-16-Ch-PWM-Servo-Driver HCSR04 PID PololuQik2 QEI Sharp mbed-rtos

Revision:
12:284be46593ae
Parent:
11:8d2455e383ce
Child:
13:529323807361
--- a/ShapeDetect.cpp	Tue Apr 01 02:00:01 2014 +0000
+++ b/ShapeDetect.cpp	Wed Apr 02 00:30:30 2014 +0000
@@ -248,7 +248,7 @@
 ************************************************/
 void clearBounds(void){
         //top 20 pixels
-        for(int i=0; i<10; i++){
+        for(int i=0; i<5; i++){
                  for(int j=0; j<160; j++){
                      image[i][j] = 0;
                         
@@ -256,20 +256,20 @@
                  }// i
                  
         //bottom 20 pixels         
-        for(int i=109; i<120; i++){
+        for(int i=114; i<120; i++){
                  for(int j=0; j<160; j++){
                      image[i][j] = 0;        
                     }// j
                  }// i
         //left 20 pixels         
         for(int i=0; i<120; i++){
-                 for(int j=0; j<10; j++){
+                 for(int j=0; j<20; j++){
                      image[i][j] = 0;     
                     }// j
                  }// i
          //right 20 pixels         
         for(int i=0; i<120; i++){
-                 for(int j=149; j<160; j++){
+                 for(int j=139; j<160; j++){
                      image[i][j] = 0;    
                     }// j
                  }// i
@@ -296,6 +296,7 @@
     }
 }
 
+
 int getDistance(void){
         lrf.putc('B'); //Take Binary range reading
         // read in the four bytes for the range in mm (MSB first)