Custom version for NXP cup car

Dependents:   NXPCUPcar

Revision:
1:68bb92736e14
Parent:
0:ccbc44580fab
--- a/Vision.h	Fri Mar 25 13:05:09 2016 +0000
+++ b/Vision.h	Thu Jun 01 13:17:03 2017 +0000
@@ -3,11 +3,19 @@
 #ifndef _VISION_H
 #define _VISION_H
 
+struct Point {
+    float x;
+    float y;
+};
+
 struct lineScanData {
     uint8_t mostWhiteIndex;
     uint16_t maxLightValue;
     uint8_t rightEdgeIndex;
     uint8_t leftEdgeIndex;
+    struct Point rightEdgePosition;
+    struct Point leftEdgePosition;
+    Timer age;
 };
 
 class Vision
@@ -15,7 +23,7 @@
     public:
 
     Vision();
-    void processTasks();
+    bool processTasks();
     void saveData(uint16_t* line);
     struct lineScanData processLine();
     bool lightCompensation;
@@ -26,7 +34,9 @@
     uint16_t lineData[128];
     bool newDataToProcess;
     struct lineScanData currentRoadData;
+    Timer dataAge;
     void lineScanLightAdjust();
+    struct Point getPixelPosition(uint8_t pixelIndex);
 };
 
 #endif
\ No newline at end of file