The MGC3130 is the world’s first electrical-field (E-field) based three-dimensional (3D) tracking and gesture controller
Dependents: NucleoMGC3130 i2c_master
Diff: GestILibrarMessage/BufferedArray.cpp
- Revision:
- 7:eacd776fce29
- Parent:
- 6:b511421e7dc8
diff -r b511421e7dc8 -r eacd776fce29 GestILibrarMessage/BufferedArray.cpp --- a/GestILibrarMessage/BufferedArray.cpp Tue Oct 13 19:59:27 2015 +0000 +++ b/GestILibrarMessage/BufferedArray.cpp Thu Oct 15 16:10:55 2015 +0000 @@ -7,6 +7,13 @@ index = 0; } +BufferedArray::BufferedArray(int size) +{ + max = size; + data = new char[size]; + index = 0; +} + BufferedArray::BufferedArray(BufferedArray * bufferedArray) { this->data = bufferedArray->data; @@ -92,7 +99,7 @@ index++; } -void BufferedArray::sets(char * value, int offset, int length) +void BufferedArray::sets(const char * value, int offset, int length) { if (length <= 0) return; @@ -104,7 +111,7 @@ index += length; } -void BufferedArray::sets(int position, char * value, int offset, int length) +void BufferedArray::sets(int position, const char * value, int offset, int length) { if (position < 0) return;