Moved to Team 9.

Fork of LineScan by Nicholas Gan

Revision:
39:ea0660f7d724
Parent:
38:1ac5f0ab5ae6
--- a/LineScan.cpp	Sat Nov 21 04:19:29 2015 +0000
+++ b/LineScan.cpp	Mon Nov 23 23:57:58 2015 +0000
@@ -135,8 +135,8 @@
     }
     
     if(preferLeftLine){
-        l_walker = l_idx_ary + IDX_ARY_LEN - 1;
-        h_walker = h_idx_ary + IDX_ARY_LEN - 1;
+        l_walker = l_idx_ary + l_idx_pos - 1;
+        h_walker = h_idx_ary + h_idx_pos - 1;
         
         while(*l_walker != -1 && *h_walker != -1){
             //evaluate out and advance if line is white on black and returns center of smallest white band
@@ -151,9 +151,6 @@
                 h_walker--;
             }
             l_walker--;
-            
-            //serial.printf("%d %d\r\n", *h_walker, *l_walker);
-            //serial.printf("%.2f\r\n", out);
         }
     } else {
         l_walker = l_idx_ary + 1;
@@ -172,9 +169,6 @@
                 l_walker++;
             }
             h_walker++;
-            
-            //serial.printf("%d %d\r\n", *h_walker, *l_walker);
-            //serial.printf("%.2f\r\n", out);
         }
     }