Moved to Team 9.

Fork of LineScan by Nicholas Gan

Revision:
16:aaac67b2bce4
Parent:
15:4bd1c1d2cf94
Child:
17:4ba196fe78ea
--- a/LineScan.cpp	Sat Apr 18 06:04:30 2015 +0000
+++ b/LineScan.cpp	Sat Apr 18 08:46:22 2015 +0000
@@ -56,10 +56,10 @@
     //for AGC
     float exposureChange;
     
-    if(array){ 
-        memset (h_idx_ary, -1, frameLen);
-        memset (l_idx_ary, -1, frameLen);
+    memset (h_idx_ary, -1, frameLen);
+    memset (l_idx_ary, -1, frameLen);
     
+    if(array){    
         avg[0] = array[SKIP - 1]/2 + array[SKIP]/2;
         diff[0] = 0;
         tele_linescan_diff[0] = 0;
@@ -122,6 +122,7 @@
     
     l_walker = l_idx_ary;
     h_walker = h_idx_ary;
+    
     while(*l_walker != -1 && *h_walker != -1){
         //evaluate out and advance if line is white on black and returns center of smallest white band
         //if interval is black on white, advance the pointer for the peak array