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 haofan Zheng

Revision:
44:15de535c4005
Parent:
42:c4e1606087ff
Child:
46:a5eb9bd3bb55
--- a/Hardwares/ArduUTFT.h	Mon Mar 27 22:09:22 2017 +0000
+++ b/Hardwares/ArduUTFT.h	Wed Mar 29 21:19:27 2017 +0000
@@ -24,6 +24,9 @@
 #define UTFT_LEFT 0
 #define UTFT_RIGHT 9999
 #define UTFT_CENTER 9998
+
+#define CAM_IMG_CANVAS_ROW_OFFSET 20
+#define CAM_IMG_CANVAS_COL_OFFSET 300
     
 void ardu_utft_init(); //We only use LANDSCAPE orientation!
 
@@ -55,4 +58,14 @@
 
 void ardu_utft_print(char * st, int x, int y);
 
+inline void ardu_utft_set_camimg_row(const uint16_t row)
+{
+    ardu_utft_set_xy(0, row + CAM_IMG_CANVAS_ROW_OFFSET, CAM_IMG_CANVAS_COL_OFFSET, row + CAM_IMG_CANVAS_ROW_OFFSET);
+}
+
+inline void ardu_utft_set_camimg_rowcol(const uint16_t row, const uint16_t col)
+{
+    ardu_utft_set_xy(0, row + CAM_IMG_CANVAS_ROW_OFFSET, CAM_IMG_CANVAS_COL_OFFSET - col, row + CAM_IMG_CANVAS_ROW_OFFSET);
+}
+
 #endif //ARDU_UTFT_H
\ No newline at end of file