Theo Le Paih / Mbed 2 deprecated Lib_Pixy2

Dependencies:   mbed

Revision:
25:2a2fcb9e4775
Parent:
23:d6bbc4ec1f22
Child:
26:a56cc5d715e9
--- a/main.cpp	Thu Nov 21 08:46:09 2019 +0000
+++ b/main.cpp	Thu Nov 21 09:31:05 2019 +0000
@@ -19,7 +19,7 @@
 {
     PIXY2               maPixy(PC_12, PD_2);     // PC_12 : UART5_TX --- PD_2 : UART5_RX
     
-    T_pixy2Version*     testVersion;
+    T_pixy2Resolution*     testResolution;
     T_pixy2ErrorCode    rep;
     
     // Initialisations
@@ -44,7 +44,7 @@
                 break;
 
             case SND :
-                rep = maPixy.pixy2_getVersion(&testVersion);
+                rep = maPixy.pixy2_getResolution(&testResolution);
                 //pc.printf("%d\n\r",rep);                      // Affichage des erreurs renvoyées
                 if (rep == PIXY2_BAD_CHECKSUM) {
                     etat = CHECKSUM_ERROR;   
@@ -70,7 +70,8 @@
                 break;
 
             case OK :
-            
+                pc.printf("Pixy frame width  : %d\n\r", testResolution->pixFrameWidth);
+                pc.printf("Pixy frame height : %d\n\r", testResolution->pixFrameHeight);
                 etat = IDLE;
                 break;