diff --git a/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/ExerciseManager.java b/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/ExerciseManager.java index 94450be..94599a9 100644 --- a/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/ExerciseManager.java +++ b/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/ExerciseManager.java @@ -29,7 +29,7 @@ public class ExerciseManager { private static final String PROPERTY_NAME = "name"; // The delimiter used to separate the paths of the sensors. - public static final String PATH_DELIMITER = ";"; + public static final String PATH_DELIMITER = ":"; public static final int SENSOR_COUNT = 2; @@ -96,6 +96,7 @@ public class ExerciseManager { // Ensure all required properties are present for (String property : REQUIRED_PROPERTIES) { if (!content.has(property)) { + System.out.println("Missing property: " + property); return null; } } @@ -103,10 +104,13 @@ public class ExerciseManager { // Path data is split into two parts, due to the left and right hand. // If one wants to add support for more sensors, one will have to adjust the Exercise // class to support more paths. + System.out.println(content.get(PROPERTY_PATH).getAsString()); String[] leftRightData = content.get(PROPERTY_PATH).getAsString().split(PATH_DELIMITER); - if (leftRightData.length != SENSOR_COUNT) + if (leftRightData.length != SENSOR_COUNT) { + System.out.println("Invalid path data."); return null; + } return new Exercise( EMuscleGroup.parse(content.get(PROPERTY_MUSCLE_GROUP).getAsString()), diff --git a/code/src/Fitbot/app/src/main/java/com/example/fitbot/util/path/GesturePath.java b/code/src/Fitbot/app/src/main/java/com/example/fitbot/util/path/GesturePath.java index 0b6a857..9f9decd 100644 --- a/code/src/Fitbot/app/src/main/java/com/example/fitbot/util/path/GesturePath.java +++ b/code/src/Fitbot/app/src/main/java/com/example/fitbot/util/path/GesturePath.java @@ -13,8 +13,10 @@ public class GesturePath { * @param vectors The vectors that make up the path. */ public GesturePath(Vector3f[] vectors) { - if (vectors.length < 2) - throw new IllegalArgumentException("A path must have at least two points."); + if (vectors.length < 2) { + this.segments = new PathSegment[0]; + return; + } this.segments = new PathSegment[vectors.length - 1]; for (int i = 0; i < vectors.length - 1; i++) @@ -98,7 +100,7 @@ public class GesturePath { // Check if the input string contains a valid amount of bytes (12 bytes per vector) if (input.length() % 12 != 0) { - throw new IllegalArgumentException("Invalid input string length"); + throw new IllegalArgumentException("Invalid input string length (" + input.length() + " bytes provided - must be a multiple of 12)"); } Vector3f[] vectors = new Vector3f[input.length() / 12]; diff --git a/code/src/Fitbot/app/src/main/res/raw/armcircle.qianim b/code/src/Fitbot/app/src/main/res/raw/armcircle.qianim index 5d8005b..2c796e3 100644 --- a/code/src/Fitbot/app/src/main/res/raw/armcircle.qianim +++ b/code/src/Fitbot/app/src/main/res/raw/armcircle.qianim @@ -40,7 +40,7 @@ - + @@ -177,14 +177,14 @@ - + - + - + diff --git a/code/src/Fitbot/app/src/main/res/raw/bubble-pop-ding-betacut-1-00-01.mp3 b/code/src/Fitbot/app/src/main/res/raw/bubble-pop-ding-betacut-1-00-01.mp3 new file mode 100644 index 0000000..9fe5526 Binary files /dev/null and b/code/src/Fitbot/app/src/main/res/raw/bubble-pop-ding-betacut-1-00-01.mp3 differ diff --git a/docs/documentation/hardware/Ideasforfitbord.md b/docs/documentation/hardware/Ideasforfitbord.md new file mode 100644 index 0000000..8efdd05 --- /dev/null +++ b/docs/documentation/hardware/Ideasforfitbord.md @@ -0,0 +1,17 @@ +# Ideas for hardware + +# making a balance bord + +Since We are not able to connect the wii fit bord we have to come up with a solution. We thought of it for some time and what we want to do with it. Origanlly we wanted to use the balance bord for excersises such as standing on one leg. This is a simple leg excersise we wanted to have. We thaugt of multiple solutions to still have this excersise. However we still needed to think of a design for the frame. + +# the frame + +We wanted it to have a similar style to the balance bord. howevere since we can make or own we wanted to make it a bit taller. This makes it easier to implement some other excersise such as the step up. This is na excersise that benefits from a taller box than the wii fit box. + +## LDR + +We can use a LDR to determine if someone is standing on the bord + +## Knock sensor + +![alt text](../assets/knocksensor.png) \ No newline at end of file