|
Mindsensors NXTCam driver. More...
#include "common.h"
Go to the source code of this file.
Data Structures | |
struct | blob |
Defines | |
#define | MAX_BLOBS 8 |
#define | NXTCAM_I2C_ADDR 0x02 |
#define | NXTCAM_CMD_REG 0x41 |
#define | NXTCAM_COUNT_REG 0x42 |
#define | NXTCAM_DATA_REG 0x43 |
#define | SIDE_CENTER(X1, X2) ((X1 + X2) / 2) |
Typedefs | |
typedef blob | blob_array [MAX_BLOBS] |
Functions | |
bool | NXTCAMinit (tSensors link, ubyte address=NXTCAM_I2C_ADDR) |
bool | NXTCAMinitTL (tSensors link, ubyte address=NXTCAM_I2C_ADDR) |
int | NXTCAMgetBlobs (tSensors link, blob_array &blobs, bool mergeBlobs, ubyte address=NXTCAM_I2C_ADDR) |
int | NXTCAMgetBlobs (tSensors link, blob_array &blobs, ubyte address=NXTCAM_I2C_ADDR) |
bool | _camera_cmd (tSensors link, byte cmd, ubyte address) |
int | _mergeBlobs (int blob1, int blob2, int nblobs, blob_array &blobs) |
int | _merge (int nblobs, blob_array &blobs) |
void | _sortBlobs (int nblobs, blob_array &blobs) |
void | NXTCAMgetAverageCenter (blob_array &blobs, int nblobs, int colourindex, int &x, int &y) |
void | NXTCAMgetCenter (blob_array &blobs, int index, int &x, int &y) |
Variables | |
tByteArray | NXTCAM_I2CRequest |
tByteArray | NXTCAM_I2CReply |
bool | still_merging = false |
Mindsensors NXTCam driver.
mindsensors-nxtcam.h provides an API for the Mindsensors NXTCam. This version is an extensive rewrite of Gordon Wyeth's driver. The blob information is no longer kept in seperate array, but in an array of structs.
Changelog:
License: You may use this code as you wish, provided you give credit where it's due.
THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.
Definition in file mindsensors-nxtcam.h.