fixed error in translating accelerometer data into separate x,y,z values.

This commit is contained in:
Graham Jones
2023-12-16 21:05:05 +00:00
parent 67b6c4f242
commit 2aa1e89739

View File

@@ -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