Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: pixy2.h
- Revision:
- 20:8e3adcaab290
- Parent:
- 19:007d361c8d66
- Child:
- 21:aeb9fb464ef9
--- a/pixy2.h Mon Apr 01 12:34:14 2019 +0000 +++ b/pixy2.h Mon Apr 01 15:34:15 2019 +0000 @@ -610,6 +610,15 @@ private : // Variables globales Privées +/** + * @var etat (T_Pixy2State) state of the pixy2 cam (idle = No action, messageSent = Query or Set message sent, receivingHeader = Camera is respondig to the query/set, receivingData = Header received, dataReceived = All data has been recovered) + * @var Pixy2_buffer (Array of Byte) bytes received from camera + * @var wPointer (Byte) write pointer, pointing the next free cell of the array of received bytes + * @var hPointer (Byte) header pointer, pointing on the begining of the header field in the array of received bytes + * @var dPointer (Byte) data pointer, pointing on the begining of the data field in the array of received bytes + * @var dataSize (Byte) number of bytes in the data field + * @var frameContainChecksum (Byte) indicate if the received frame contains a checksum + */ T_Pixy2State etat; Byte* Pixy2_buffer; Byte wPointer, hPointer, dPointer, dataSize; @@ -790,6 +799,18 @@ */ T_pixy2ErrorCode pixy2_sndReverseVector (void); +/** + * Queries the average RGB components of a square of 5x5 pixels centered on the given pixel coordinate + * This function is part of the pixy2_getRGB function who treat the reply to this query. + * @note General description : https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:video + * @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:video_api + * @param x (Word - passed by value) : X coordinate of the center of de 5x5 pixels square (in pixel, between 0 and 315) + * @param y (Word - passed by value) : Y coordinate of the center of de 5x5 pixels square (in pixel, between 0 and 207) + * @param saturate (Byte - passed by value) : scale the 3 RGB components so that the highest one of the 3 RGB components is set to 255 (boolean : zero or non-zero) + * @param pixel (T_pixy2Pixel - passed by reference) : RGB pixel. + * @return T_pixy2ErrorCode : error code. + */ T_pixy2ErrorCode pixy2_sndGetRGB (Word x, Word y, Byte saturate); /**