Updated some stuff
This commit is contained in:
@@ -18,12 +18,7 @@ import com.example.fitbot.util.NavigationManager;
|
||||
import com.example.fitbot.util.processing.IInputHandler;
|
||||
import com.example.fitbot.util.processing.InputProcessor;
|
||||
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector4f;
|
||||
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
public class ExerciseStatusElement extends View implements IInputHandler {
|
||||
|
||||
@@ -87,8 +82,6 @@ public class ExerciseStatusElement extends View implements IInputHandler {
|
||||
|
||||
// Handler that is called every time the motion processor receives new data.
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -92,6 +92,8 @@ public class GesturePath {
|
||||
*/
|
||||
|
||||
public static GesturePath fromString(String input) {
|
||||
if (input == null)
|
||||
throw new IllegalArgumentException("Input string cannot be null");
|
||||
byte[] bytes = input.getBytes();
|
||||
|
||||
// Check if the input string contains a valid amount of bytes (12 bytes per vector)
|
||||
|
@@ -101,6 +101,7 @@ public class InputProcessor {
|
||||
if (recording) {
|
||||
this.secondsPassed = 0.0D;
|
||||
this.lastTime = System.currentTimeMillis();
|
||||
this.selfRotationVectorPaths = new Vector3f[2][(int) (duration * this.sampleRate)];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,6 +180,7 @@ public class InputProcessor {
|
||||
int deviceId = object.get("deviceId").getAsInt();
|
||||
String type = object.get("type").getAsString();
|
||||
|
||||
// Parse the retrieved data
|
||||
parseRotationVector(rotation, deviceId);
|
||||
} catch (Exception e) {
|
||||
Log.i("MotionProcessor", "Failed to parse packet data.");
|
||||
|
Reference in New Issue
Block a user