SmartWheels self-driving race car. Designed for NXP Cup. Uses FRDM-KL25Z, area-scan camera, and simple image processing to detect and navigate any NXP spec track.
Dependencies: TSI USBDevice mbed-dev
Fork of SmartWheels by
Diff: Hardwares/Camera.h
- Revision:
- 26:5814404856e2
- Parent:
- 25:6f63053cee81
- Child:
- 27:c68f711e5b67
--- a/Hardwares/Camera.h Tue Feb 21 20:00:41 2017 +0000 +++ b/Hardwares/Camera.h Tue Feb 21 20:36:38 2017 +0000 @@ -4,8 +4,8 @@ #include "OV7725RegBuf.h" -#define CAM_MAX_ROW 480 -#define CAM_MAX_COL 640 +#define CAMERA_PIXEL_WIDTH 160 +#define CAMERA_PIXEL_HEIGHT 120 namespace SW { @@ -20,10 +20,16 @@ ~Camera(); + void Update(float deltaTime); + bool HasPicture() const; const unsigned char * GetPicture() const; + void StartReceivingPic(); + + void StopReceivingPic(); + private: Camera(); @@ -36,15 +42,9 @@ InterruptIn m_vsnyc; - //unsigned char m_pics[2][(CAM_MAX_ROW + 1) * (CAM_MAX_COL + 1)]; - - unsigned char m_currentIndex; - - unsigned int m_currentRow; - - unsigned int m_currentCol; - bool m_hasPic; OV7725RegBuf * m_regBuf; + + float m_debugOutputTimer; };