an SPI interface the cmu pixy camera
Dependents: robotic_fish_ver_4_9_pixy UMO
Diff: pixy.cpp
- Revision:
- 6:4bf8d39fc5ce
- Parent:
- 5:f54759b26096
- Child:
- 7:e57b18779bf1
--- a/pixy.cpp Thu Jun 05 00:12:48 2014 +0000 +++ b/pixy.cpp Thu Jun 05 17:31:43 2014 +0000 @@ -69,8 +69,11 @@ out->signature=INVALID_BLOCK; //used for invalid signatures } //printf("found block\n"); - bestX=blocks[0].x; - bestY=blocks[0].y; + if (blocks[0].signature!=INVALID_BLOCK) + { + bestX=blocks[0].x; + bestY=blocks[0].y; + } } return; }