The MGC3130 is the world’s first electrical-field (E-field) based three-dimensional (3D) tracking and gesture controller

Dependencies:   BufferedArray

Dependents:   NucleoMGC3130 i2c_master

Revision:
4:6d639fd23628
Parent:
3:b657bfcffc0a
Child:
5:4666b36a738d
--- a/MGC3130.cpp	Thu Oct 08 17:37:33 2015 +0000
+++ b/MGC3130.cpp	Fri Oct 09 10:45:44 2015 +0000
@@ -68,7 +68,11 @@
 
     _i2c_bus.stop();
 
-    while (readMsg() == NULL || msg.getID() != GestICMsg::System_Status);
+    if (readMsg() == NULL)
+        setRuntimeParameter(para);
+
+    while (msg.getID() != GestICMsg::System_Status)
+        readMsg();
 
     return msg.get(6) | (msg.get(7) << 8);
 }
\ No newline at end of file