diff --git a/.vscode/settings.json b/.vscode/settings.json
index c5f3f6b..0e14d8e 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,3 +1,3 @@
{
- "java.configuration.updateBuildConfiguration": "interactive"
+ "java.configuration.updateBuildConfiguration": "disabled"
}
\ No newline at end of file
diff --git a/code/web/incoming_request_handlers.js b/code/server/incoming_request_handlers.js
similarity index 86%
rename from code/web/incoming_request_handlers.js
rename to code/server/incoming_request_handlers.js
index 6049b3b..1f8d257 100644
--- a/code/web/incoming_request_handlers.js
+++ b/code/server/incoming_request_handlers.js
@@ -1,4 +1,3 @@
-
/**
*
* @param {Request} request The incoming request
@@ -14,7 +13,7 @@ function handleIncoming(request, response, app, pool)
if (!request.hasOwnProperty('uid') || typeof request.uid !== 'number')
{
- query = 'SELECT * FROM Exercise';
+ query = 'SELECT * FROM Exercise ORDER BY RAND() LIMIT 1';
} else parameters.push(request.uid);
// Acquire database connection
@@ -33,11 +32,15 @@ function handleIncoming(request, response, app, pool)
// Send back the data in the right format
let converted = rows.map(row => {
return {
+ exerciseId: row.ExerciseID,
name: row.Name,
- description: row.Description,
muscleGroup: row.MuscleGroup,
+ shortDescription: row.ShortDescription,
+ description: row.Description,
imageUrl: row.ImageURL,
- videoUrl: row.VideoURL
+ videoUrl: row.VideoURL,
+ path: row.Path,
+ duration: row.Duration
};
});
diff --git a/code/web/server.js b/code/server/server.js
similarity index 100%
rename from code/web/server.js
rename to code/server/server.js
diff --git a/code/src/Fitbot/.idea/misc.xml b/code/src/Fitbot/.idea/misc.xml
index a647bf6..0389b70 100644
--- a/code/src/Fitbot/.idea/misc.xml
+++ b/code/src/Fitbot/.idea/misc.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml b/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml
index a619a72..e597559 100644
--- a/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml
+++ b/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml
@@ -45,7 +45,7 @@ tools:openDrawer="start">
android:layout_width="150dp"
android:layout_height="75dp"
android:layout_marginStart="404dp"
- android:layout_marginBottom="30dp"
+ android:layout_marginBottom="0dp"
android:background="@drawable/red_button_gradient"
android:drawableTop="@drawable/ic_baseline_home_48"
android:drawableTint="@color/white"
diff --git a/code/src/Fitbot/app/src/main/res/raw/boxing.qianim b/code/src/Fitbot/app/src/main/res/raw/boxing.qianim
new file mode 100644
index 0000000..f4c9efa
--- /dev/null
+++ b/code/src/Fitbot/app/src/main/res/raw/boxing.qianim
@@ -0,0 +1 @@
+
diff --git a/code/src/Fitbot/app/src/main/res/raw/chestpress.qianim b/code/src/Fitbot/app/src/main/res/raw/chestpress.qianim
new file mode 100644
index 0000000..56c73b9
--- /dev/null
+++ b/code/src/Fitbot/app/src/main/res/raw/chestpress.qianim
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/code/src/Fitbot/app/src/main/res/raw/shoulderpress.qianim b/code/src/Fitbot/app/src/main/res/raw/shoulderpress.qianim
new file mode 100644
index 0000000..df2c82e
--- /dev/null
+++ b/code/src/Fitbot/app/src/main/res/raw/shoulderpress.qianim
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/documentation/assets/Testkaart-wandeling.png b/docs/documentation/assets/Testkaart-wandeling.png
new file mode 100644
index 0000000..e06d8d9
Binary files /dev/null and b/docs/documentation/assets/Testkaart-wandeling.png differ
diff --git a/docs/documentation/diagrams/infrastructure.md b/docs/documentation/diagrams/infrastructure.md
new file mode 100644
index 0000000..bbb68a7
--- /dev/null
+++ b/docs/documentation/diagrams/infrastructure.md
@@ -0,0 +1,62 @@
+# Infrastructure UML
+
+``` mermaid
+classDiagram
+
+Raspberry pi --> NodeJS
+Raspberry pi --> Database
+NodeJS --> Androidapp : getExerciseData (Wifi, Rest API)
+Database <--> NodeJS : Database queries
+
+
+ESP8266 --> Androidapp : getRotationalData (Wifi)
+namespace Server {
+ class Raspberry pi {
+ +MariaDB
+ +Apache2
+ +NodeJS
+ Database()
+ Webserver()
+
+ }
+
+ class Database {
+ +ExerciseID
+ +ExerciseName
+ +ExerciseDescription
+ +ExerciseVideo
+ +GyroCoordinates
+ +MuscleGroup
+ }
+
+ class NodeJS {
+ +MariaDB
+ GetRandomExercise()
+ }
+}
+
+namespace Pepper {
+ class Androidapp {
+ +Java
+ +Android SDK
+ +QiSDK
+ motionProcessing()
+ robotMovement()
+ showVideo()
+ fitnessCycle()
+
+
+ }
+
+}
+
+namespace Hardware {
+ class ESP8266{
+ +RotationalX
+ +RotationalY
+ +RotationalZ
+ Gyroscope()
+ }
+}
+```
+
diff --git a/docs/documentation/hardware/Issues.md b/docs/documentation/hardware/Issues.md
index a152afd..18e167d 100644
--- a/docs/documentation/hardware/Issues.md
+++ b/docs/documentation/hardware/Issues.md
@@ -1,4 +1,4 @@
# Issues with hardware
-## Issues with libraries
-The websocket library doesnt work well on the esp8266 d1 mini. It lags out the entire esp and makes it unresponsive.
\ No newline at end of file
+## Issues with programming
+The websocket library doesnt work well on the esp8266 d1 mini. It lags out the entire esp and makes it unresponsive. The solution is to use a different way of communicating.
\ No newline at end of file