Cubic Hand project for EECS 249A course.

Dependencies:   MMA8451Q TSI cc3000_hostdriver_mbedsocket NVIC_set_all_priorities mbed Multi_WS2811

Revision:
28:3261015fdd17
Parent:
26:42ae7eed0b68
Child:
32:bf5f545621aa
diff -r 50be685a3f54 -r 3261015fdd17 DataGlove.cpp
--- a/DataGlove.cpp	Thu Dec 11 05:26:39 2014 +0000
+++ b/DataGlove.cpp	Thu Dec 11 05:57:54 2014 +0000
@@ -99,11 +99,11 @@
                 id = (Buf[4] << 8) + Buf[5];
                 pkgtype = Buf[3];
                 ReceiveCount++;
-                if(ReceiveCount > 501 && ReceiveCount%25 == 0) {//printf("%d %c\r\n", ReceiveCount, Buf[0]);
+                /*if(ReceiveCount > 501 && ReceiveCount%25 == 0) {//printf("%d %c\r\n", ReceiveCount, Buf[0]);
                 	printf("%f %f %f %f %f %f %f %f\r\n", corrected->roll, corrected->pitch, corrected->yaw, 
                 	corrected->fingers[0], corrected->fingers[1], corrected->fingers[2], 
                 	corrected->fingers[3], corrected->fingers[4]);
-                }
+                }*/
                 switch (pkgtype){
                     case STREAM_FINGERS_QUATERNION:
                     {
@@ -160,17 +160,17 @@
         		corrected->fingers[iter] = gl->fingers[iter] - correction->fingers[iter];
         }*/
     }
-    else {
+   else {
         //printf("couldn't get data %d\r\n", notConnectedCount);
         // Re-establishing communication in case no data is received for 1s (20 frames per second*1 = 20)
-        if (notConnectedCount > 200) {
+        /*if (notConnectedCount > 200) {
             printf("Connection broke! Trying to re-establish... %d %c\r\n",numReceived,Buf[0]);
             //GloveSocket.Reconnect();
             //StreamData(STREAM_QUATERNION);
             notConnectedCount = 0;
-        }
+        }*/
         numReceived = 0;
-        notConnectedCount++;
+        //notConnectedCount++;
     }
     return false;
 }