Moved to Team 9.

Fork of LineScan by Nicholas Gan

Revision:
32:29724cbecb59
Parent:
31:25cec6b92c59
diff -r 25cec6b92c59 -r 29724cbecb59 LineScan.cpp
--- a/LineScan.cpp	Sat May 23 07:18:58 2015 +0000
+++ b/LineScan.cpp	Sat May 23 07:34:21 2015 +0000
@@ -1,7 +1,7 @@
 #include "LineScan.h"
 #include <string.h>
 
-#define THRESH 800
+#define THRESH 600
 
 #define MEAN_REF 10000      //ideal mean we should see
 #define CAM_CTRL_GAIN 0.0003 //should be small
@@ -124,7 +124,7 @@
             }
         }
         
-        max_diff = global_max_diff;
+        max_diff = global_max_diff / THRESH;
         //AGC, simple proportional controller
         total = total / frameLen;
         exposureChange = ((float)(MEAN_REF - total)) * CAM_CTRL_GAIN;