Custom version for NXP cup car

Dependents:   NXPCUPcar

Revision:
0:ccbc44580fab
Child:
1:68bb92736e14
diff -r 000000000000 -r ccbc44580fab Vision.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Vision.h	Fri Mar 25 13:05:09 2016 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+
+#ifndef _VISION_H
+#define _VISION_H
+
+struct lineScanData {
+    uint8_t mostWhiteIndex;
+    uint16_t maxLightValue;
+    uint8_t rightEdgeIndex;
+    uint8_t leftEdgeIndex;
+};
+
+class Vision
+{
+    public:
+
+    Vision();
+    void processTasks();
+    void saveData(uint16_t* line);
+    struct lineScanData processLine();
+    bool lightCompensation;
+    struct lineScanData getRoadData();
+
+    private:
+    
+    uint16_t lineData[128];
+    bool newDataToProcess;
+    struct lineScanData currentRoadData;
+    void lineScanLightAdjust();
+};
+
+#endif
\ No newline at end of file