fixed error in translating accelerometer data into separate x,y,z values.
This commit is contained in:
@@ -397,7 +397,7 @@ public class SdDataSourceBLE extends SdDataSource {
|
|||||||
short x, y, z;
|
short x, y, z;
|
||||||
x = newAccVals[i];
|
x = newAccVals[i];
|
||||||
y = newAccVals[i + 1];
|
y = newAccVals[i + 1];
|
||||||
z = newAccVals[i + 3];
|
z = newAccVals[i + 2];
|
||||||
// Calculate vector magnitude
|
// Calculate vector magnitude
|
||||||
rawData[nRawData] = Math.sqrt(x * x + y * y + z * z);
|
rawData[nRawData] = Math.sqrt(x * x + y * y + z * z);
|
||||||
// Store 3d values
|
// Store 3d values
|
||||||
|
|||||||
Reference in New Issue
Block a user