Library for Pixy - CMUCAM5 smart camera

Dependents:   TestPixy FRC_2018 FRC2018_Bis 0hackton_08_06_18 ... more

Fork of Pixy by FRC - Hackathon

Revision:
6:f16f250fe2cb
Parent:
5:d395fe0fb0e0
Child:
7:c809db7aa1c0
diff -r d395fe0fb0e0 -r f16f250fe2cb Pixy.h
--- a/Pixy.h	Thu May 31 17:24:52 2018 +0000
+++ b/Pixy.h	Wed Apr 17 10:07:52 2019 +0000
@@ -47,6 +47,9 @@
 #define N_BLOCCODE          0xAA55
 #define CC_BLOCCODE         0xAA56
 
+#define NM_MAXOBJECT        20
+#define CC_MAXOBJECT        20              
+
     /**
      *  \struct Byte    ->      Short hand for unsigned char
      *  \struct Word    ->      Short hand for unsigned short
@@ -146,15 +149,15 @@
  * @note A FIFO is a circular buffer where data are stored in the order in witch they arrive and can be read in the same order. A FIFO need 2 variables (call read and write pointers) to point both read and write registers.
  * @note The library manage both read and write pointers with FIFO functions, but users can access the FIFO with their own code, users must then manage their own read pointers while write pointers (that are strictly private) can only be managed by the library functions.   
  *
- *  \var Pixy_CCFIFO[20]
- *  \brief is a FIFO where the Color Code objects are stored. FIFO can store up to 20 objects
+ *  \var Pixy_CCFIFO[CC_MAXOBJECT]
+ *  \brief is a FIFO where the Color Code objects are stored. FIFO can store up to 20 objects (CC_MAXOBJECT = 20)
  */
 
 /** Direct access to the NM FIFO
  * @note A FIFO is a circular buffer where data are stored in the order in witch they arrive and can be read in the same order. A FIFO need 2 variables (call read and write pointers) to point both read and write registers.
  * @note The library manage both read and write pointers with FIFO functions, but users can access the FIFO with their own code, users must then manage their own read pointers while write pointers (that are strictly private) can only be managed by the library functions.   
- *  \var Pixy_NMFIFO[20]
- *  \brief is a FIFO where the Normal objects are stored. FIFO can store up to 20 objects
+ *  \var Pixy_NMFIFO[NM_MAXOBJECT]
+ *  \brief is a FIFO where the Normal objects are stored. FIFO can store up to 20 objects (NM_MAXOBJECT = 20)
  */
  
 /** 
@@ -165,8 +168,8 @@
  *  \brief is the number of normal object read by the library ISR from the CAM during the last frame
  *  @note not Thread Safe
  */
-    T_pixyCCData        Pixy_CCFIFO[20];    // FIFO des objets ColorCode
-    T_pixyNMData        Pixy_NMFIFO[20];    // FIFO des objets Normaux
+    T_pixyCCData        Pixy_CCFIFO[CC_MAXOBJECT];    // FIFO des objets ColorCode
+    T_pixyNMData        Pixy_NMFIFO[NM_MAXOBJECT];    // FIFO des objets Normaux
     Byte                Pixy_CCObjet;       // Nombre d'objets de type Color Code
     Byte                Pixy_NMObjet;       // Nombre d'objets Normaux
     Byte                Pixy_FirstCCObjet;  // Position dans la FIFO du premier objet de la trame suivante