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:
6:b511421e7dc8
Parent:
5:4666b36a738d
--- a/MGC3130.cpp	Fri Oct 09 11:26:22 2015 +0000
+++ b/MGC3130.cpp	Tue Oct 13 19:59:27 2015 +0000
@@ -1,7 +1,7 @@
 #include "MGC3130.h"
 
 MGC3130::MGC3130(PinName sda, PinName scl, PinName EI0, bool IS2)
-    :TS_Line(EI0), _i2c_bus(sda,scl), msg(255), sensor()
+    :TS_Line(EI0), _i2c_bus(sda,scl), msg(), sensor()
 {
     TS_Line.output();
     TS_Line.write(1);
@@ -19,7 +19,7 @@
     if (TS_Line.read() == 0)
         return NULL;
 
-    msg.reset();
+    msg.rewind();
 
     TS_Line.output();
     TS_Line.write(0);