![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Cubic Hand project for EECS 249A course.
Dependencies: MMA8451Q TSI cc3000_hostdriver_mbedsocket NVIC_set_all_priorities mbed Multi_WS2811
Diff: DataGlove.cpp
- Revision:
- 46:a7c041aaf259
- Parent:
- 42:4e1aaab14886
- Child:
- 47:6d0d7bafcb6f
--- a/DataGlove.cpp Thu Dec 11 14:04:49 2014 +0000 +++ b/DataGlove.cpp Thu Dec 11 15:28:27 2014 +0000 @@ -23,6 +23,7 @@ { GloveSocket.Init(); GloveSocket.Connect(); + StreamData(0); StreamData(STREAM_FINGERS_QUATERNION); } @@ -135,14 +136,14 @@ 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) { - printf("Connection broke! Trying to re-establish... %d %c\r\n",numReceived,Buf[0]); + if (notConnectedCount > 200) { + //printf("Connection broke! Trying to re-establish... %d %c\r\n",numReceived,Buf[0]); //GloveSocket.Reconnect(); - //StreamData(STREAM_QUATERNION); + StreamData(STREAM_FINGERS_QUATERNION); notConnectedCount = 0; - }*/ + }//*/ numReceived = 0; - //notConnectedCount++; + notConnectedCount++; } return false; }