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/ArduCAM.cpp
- Revision:
- 63:d9a81b3d69f5
- Parent:
- 57:0d8a155d511d
- Child:
- 64:43ab429a37e0
diff -r bc5caf59fe39 -r d9a81b3d69f5 Hardwares/ArduCAM.cpp --- a/Hardwares/ArduCAM.cpp Sun Apr 09 18:20:57 2017 +0000 +++ b/Hardwares/ArduCAM.cpp Sun Apr 09 22:08:34 2017 +0000 @@ -14,8 +14,8 @@ #define CAM_BLK_CAL_ACTIVE //#define CAM_DISP_DEBUG -//#define CAM_DISP_DEBUG_CENTER -//#define CAM_DISP_IMG +#define CAM_DISP_DEBUG_CENTER +#define CAM_DISP_IMG #define IMG_PROC_SIGNAL 0xBB @@ -31,12 +31,12 @@ static uint8_t temp_mid_pos = RESOLUTION_WIDTH / 2; static uint8_t black_calibrate = 70; static volatile uint8_t centerLine[CAM_ROI_UPPER_LIMIT]; -static Thread * m_imgProcessThread = NULL; -static Ticker m_tickerImgProc; +//static Thread * m_imgProcessThread = NULL; +//static Ticker m_tickerImgProc; //void image_processing(); void cal_black_calibrate(); -void tick_image_proc(); +//void tick_image_proc(); inline void ardu_cam_spi_write_8(int address, int value) { @@ -345,7 +345,7 @@ void image_processing() { - DebugCounter counter(10, PTE4); + //while(true) { ardu_cam_start_capture(); @@ -403,7 +403,7 @@ } - counter.Update(); + //counter.Update(); //Thread::signal_wait(IMG_PROC_SIGNAL, osWaitForever); } } @@ -430,12 +430,12 @@ } } - +/* void tick_image_proc() { m_imgProcessThread->signal_set(IMG_PROC_SIGNAL); } - +*/ #ifdef __cplusplus } #endif