pixy2 smart camera library www.pixycam.com
Pixy2 Library project (using UART interface)
Diff: pixy2.h
- Revision:
- 14:c0eda1e35a00
- Parent:
- 13:478380d73e80
- Child:
- 15:c6e090cff722
--- a/pixy2.h Tue Mar 12 16:53:22 2019 +0000 +++ b/pixy2.h Tue Mar 12 17:26:18 2019 +0000 @@ -72,11 +72,14 @@ /** * \struct T_pixy2ErrorCode * \brief Explicit error code list : - * \param PIXY2_OK : No error - * \param PIXY2_MISC_ERROR : Unknown error - * \param PIXY2_BUSY : Pixy hasn't finish yet - * \param PIXY2_BAD_CHECKSUM : Checksum is wrong - * \param PIXY2_TYPE_ERROR : Unexpected message type + * \param PIXY2_OK : No error + * \param PIXY2_MISC_ERROR : Generic error + * \param PIXY2_BUSY : Pixy is busy (the response message is not yet fully arrived) + * \param PIXY2_BAD_CHECKSUM : Checksum is wrong + * \param PIXY2_TIMEOUT : Pixy2 is not talking + * \param PIXY2_BUTTON_OVERRIDE : User is manualy operating the button of the Pixy2 + * \param PIXY2_PROG_CHANGE : Checksum is wrong + * \param PIXY2_TYPE_ERROR : Unexpected message type * @note More documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:general_api#error-codes */ typedef int T_pixy2ErrorCode; @@ -85,6 +88,9 @@ #define PIXY2_MISC_ERROR -1 #define PIXY2_BUSY -2 #define PIXY2_BAD_CHECKSUM -3 +#define PIXY2_TIMEOUT -4 +#define PIXY2_OVERRIDE -5 +#define PIXY2_PROG_CHANGE -6 #define PIXY2_TYPE_ERROR -7 /**************** STATE MACHINE ****************/ @@ -199,7 +205,7 @@ }T_pixy2ReturnCode; /** - * \struct T_Pixy2Version + * \struct T_pixy2Version * \brief Structured type that match pixy2 version frame (type = 14/15) message payload * \param pixHWVersion (Word) : 16 bits hardWare Version of pixy2 * \param pixFWVersionMaj (Byte) : 8 bits upper part of firmware (before the dot) @@ -216,7 +222,7 @@ }T_pixy2Version; /** - * \struct T_Pixy2Resolution + * \struct T_pixy2Resolution * \brief Structured type that match pixy2 resolution frame (type = 12/13) message payload * \param pixFrameWidth (Word) : 16 bits width (in pixel) of an image * \param pixFrameHeight (Word) : 16 bits height (in pixel) of an image @@ -252,7 +258,7 @@ }T_pixy2Bloc; /** - * \struct T_Pixy2Vector + * \struct T_pixy2Vector * \brief Structured type that match pixy2 vector definition - used in Line frame (type 48/49) - message payload * \param pixX0 (Byte) : 8 bits X (horizontal, relative to the left of image) position of the tail of the vector (number between 0 and 78) * \param pixY0 (Byte) : 8 bits Y (vertical, relative to the top of image) position of the tail of the vector (number between 0 and 51) @@ -274,7 +280,7 @@ }T_pixy2Vector; /** - * \struct T_Pixy2InterLine + * \struct T_pixy2InterLine * \brief Structured type that match pixy2 intersection line definition - used in Line frame (type 48/49) - message payload * \param pixIndex (Byte) : 8 bits tracking identification of the intersection line (set by pixy2 to ease a line following program) * \param pixReserved (Byte) : Not documented by manufacturer @@ -501,7 +507,7 @@ * @note General description : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:line_tracking * @note Frame Documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:porting_guide * @note Function Documentation : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:pixy2_full_api#plugin_include__wiki__v2__line_api - * @param mode (Byte - passed by value) : feature filtering + * @param mode (Byte - passed by value) : required feature * @return T_pixy2ErrorCode : error code. * @note There are 3 possible features (vectors, intersections and barcodes). * @note Filtering or the feature detected are based on ORing codes : 1 for vectors, 2 for intersections, 4 for barcodes.