Moved to Team 9.

Fork of LineScan by Nicholas Gan

Revision:
11:5e66d0531053
Parent:
9:5226617d2019
Child:
12:ce6d9f7dc76e
--- a/LineScan.cpp	Fri Apr 03 00:27:53 2015 +0000
+++ b/LineScan.cpp	Thu Apr 09 18:11:47 2015 +0000
@@ -63,13 +63,13 @@
         }
         exposureChange = ((float)(MEAN_REF - highest + lowest)) * CAM_CTRL_GAIN;    //AGC, simple proportional controller
         *exposure += (int)exposureChange;
-        if(*exposure < 10)
-            *exposure = 10;
+        if(*exposure < 1)
+            *exposure = 1;
         else if(*exposure > 30)
             *exposure = 30;
     }
     
-    return ((float)(h_idx + l_idx)) / (2.0 * (float)frameLen);    //0 is center
+    return ((float)(h_idx + l_idx)) / (2.0 * (float)frameLen);    //0.5 is center
 }
 
 //call after integration time is done, returns index of array line is expected to be at and new exposure time