Compare commits

...

427 Commits

Author SHA1 Message Date
993609ac86 Update Betoog.md 2024-06-13 11:32:19 +02:00
f26ac2f279 betoog 2024-06-12 19:51:39 +02:00
Niels Gras
764ed7916c correctie betoog 2024-06-11 15:13:50 +02:00
Niels Gras
fb70ec9fc4 fout in bronvermelding 2024-06-11 14:41:18 +02:00
Niels Gras
002aa5b03d changed style and fixed errors in betoog 2024-06-11 12:39:36 +02:00
f36fb4d2c1 sprint 3 retro + sprint report 2024-06-11 12:11:59 +02:00
5d51ae6fdd Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-11 09:55:16 +02:00
f0f2481288 last minute changes 2024-06-11 09:55:09 +02:00
Niels
38801cb236 fixed bronvermelding 2024-06-10 23:34:12 +02:00
Niels
6b27e035a5 verbetering betoog 2024-06-10 19:56:06 +02:00
dc4a29eb99 fixies, animation, say 2024-06-10 12:27:57 +02:00
756b98ed2e Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-10 12:17:28 +02:00
Niels Gras
737230ff82 added speech to endscreen 2024-06-10 12:16:26 +02:00
Niels Gras
ba92ec83f1 deleted unused animations 2024-06-10 12:05:03 +02:00
f0c4c28911 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-10 11:46:56 +02:00
63a3e6870e fix nullobject reference (luca) and made it so the repetitioncount resets properly 2024-06-10 11:46:52 +02:00
Niels Gras
230512ea32 Merge remote-tracking branch 'origin/main' 2024-06-10 11:46:20 +02:00
Niels Gras
27d644e304 fixed help message 2024-06-10 11:46:13 +02:00
2453b8581f Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-10 10:51:31 +02:00
e91deedcc3 array intialization 2024-06-10 10:51:20 +02:00
cdb36c9303 Opmaak 2024-06-09 23:17:48 +02:00
1e958005f6 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-09 21:21:48 +02:00
1d4447dd8c betoog 2024-06-09 21:20:32 +02:00
83edfbccab revert 2024-06-09 18:51:37 +02:00
0a250ed238 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-07 16:21:51 +02:00
495aaa9b09 changed input script 2024-06-07 16:21:40 +02:00
Niels Gras
465df515ed fixed help message 2024-06-07 15:13:00 +02:00
Niels Gras
d162658f16 added code comments 2024-06-07 14:55:53 +02:00
dd37b52e83 fix that it goes to endscreen at end 2024-06-07 14:48:13 +02:00
2fce84bf43 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-07 14:29:17 +02:00
5f579f4e50 algorithm optimization 2024-06-07 14:29:13 +02:00
Niels Gras
d411e63382 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-07 14:28:40 +02:00
Niels Gras
f098710974 added auto complete after 10 reps 2024-06-07 14:28:20 +02:00
2ffc391032 changes to see how its faulty 2024-06-07 12:36:21 +02:00
8aa8c674d9 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-07 11:56:57 +02:00
4778622f46 coding conventions 2024-06-07 11:56:51 +02:00
0aee38e706 BOM 2024-06-07 11:54:06 +02:00
Niels
c7fdda9cb1 removed unused activity 2024-06-06 14:09:38 +02:00
Niels
b2ead915ef added comments to Connectivity class 2024-06-06 13:59:38 +02:00
SebasKoedam
36b0d079b2 removed button 2024-06-05 18:01:15 +02:00
SebasKoedam
7f21c3c81b Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 18:00:41 +02:00
SebasKoedam
9295f548db chore: Update layout of activity_end_screen.xml 2024-06-05 18:00:40 +02:00
ff61ba4645 yes 2024-06-05 18:00:36 +02:00
5537230b49 Changes 2024-06-05 17:36:01 +02:00
3b7352aa4c Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 16:57:17 +02:00
e30fe9d108 luca 2024-06-05 16:57:12 +02:00
SebasKoedam
ad7a9eddc7 ajdkajkdj 2024-06-05 16:56:41 +02:00
f53d628d3b Luca stuff 2024-06-05 16:16:10 +02:00
Luca Warmenhoven
8e57713152 Fixed more issues, added more logging 2024-06-05 15:44:55 +02:00
Luca Warmenhoven
7320e10513 Fixed more issues, added more logging 2024-06-05 15:42:15 +02:00
798ba87e4d extra logs 2024-06-05 15:36:53 +02:00
28dee7de99 small changes 2024-06-05 15:25:53 +02:00
Niels Gras
89dfee5ac9 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 15:08:20 +02:00
Niels Gras
9896bcefba added speech to helpscreen 2024-06-05 15:07:56 +02:00
SebasKoedam
819f04f59e Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 15:07:26 +02:00
SebasKoedam
e90abbfe9a removed shimmer effect due to compatebility with rest of the code 2024-06-05 15:07:25 +02:00
Luca Warmenhoven
9eadbf3ad3 Merge remote-tracking branch 'origin/main' 2024-06-05 15:07:17 +02:00
Luca Warmenhoven
3ed4db39c0 Fixed thread issues 2024-06-05 15:07:13 +02:00
Niels Gras
e63767d828 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 14:51:38 +02:00
Niels Gras
68e688bb0e added pepper animation using class 2024-06-05 14:50:50 +02:00
Luca Warmenhoven
612d411c3f Merge remote-tracking branch 'origin/main' 2024-06-05 14:50:09 +02:00
Luca Warmenhoven
cca91461f3 Fixed issues 2024-06-05 14:50:05 +02:00
b0fd9eb89e Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 14:44:16 +02:00
bbb8e3d84c disabled animation stuff 2024-06-05 14:44:13 +02:00
SebasKoedam
ab00985863 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 14:43:46 +02:00
SebasKoedam
711cf922b7 added a stop for the shimmer 2024-06-05 14:43:45 +02:00
81cef9ce0b Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 14:34:32 +02:00
Luca Warmenhoven
2b631bd600 Added error checking 2024-06-05 14:34:04 +02:00
a55e5d56cc Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 14:33:21 +02:00
8fde16bac1 fix run ui thread 2024-06-05 14:32:37 +02:00
Luca Warmenhoven
f4cbf50821 Added error checking 2024-06-05 14:32:06 +02:00
Luca Warmenhoven
e0bb86d0e9 Merge remote-tracking branch 'origin/main' 2024-06-05 14:23:33 +02:00
Luca Warmenhoven
3265ea308e Added error checking 2024-06-05 14:23:29 +02:00
SebasKoedam
53a6b647c3 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 14:22:32 +02:00
SebasKoedam
83d2db6473 added shimmer animation 2024-06-05 14:22:31 +02:00
933986947c Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 14:16:35 +02:00
d40d874e01 UML arduino code 2024-06-05 14:16:29 +02:00
SebasKoedam
eacadfde5d het sloopte wel :((( 2024-06-05 14:13:44 +02:00
SebasKoedam
e33313fe2b Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 14:08:18 +02:00
SebasKoedam
b5d2e057c3 hoppelijk sloopt dit niks 2024-06-05 14:08:17 +02:00
Luca Warmenhoven
53e839ff4a Merge remote-tracking branch 'origin/main' 2024-06-05 14:07:00 +02:00
Luca Warmenhoven
0a2999afa1 Added faulty movement checking function 2024-06-05 14:06:57 +02:00
bb9e67a57e Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 13:56:33 +02:00
d0c74c4e25 comments and cleanup 2024-06-05 13:56:23 +02:00
Niels Gras
bf651cd92b Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 13:45:03 +02:00
Niels Gras
213af5e6fb Fixed animation placement 2024-06-05 13:45:00 +02:00
SebasKoedam
b811187f5c Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 13:43:39 +02:00
SebasKoedam
8e7b8dbafe added exercise rep increment to input processor 2024-06-05 13:43:11 +02:00
Luca Warmenhoven
a0f600c438 Merge remote-tracking branch 'origin/main' 2024-06-05 13:40:37 +02:00
Niels Gras
65f4bb32b7 fixed animation code placement 2024-06-05 13:40:30 +02:00
Luca Warmenhoven
8c462e9f48 Poekseps 2024-06-05 13:31:21 +02:00
fbca5ce351 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 13:28:27 +02:00
23d4ce696a Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 13:28:22 +02:00
SebasKoedam
7384f0e62b Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 13:26:40 +02:00
SebasKoedam
cc46a109a6 added sound effects 2024-06-05 13:26:39 +02:00
Luca Warmenhoven
4fb2d3897a Merge remote-tracking branch 'origin/main' 2024-06-05 13:25:01 +02:00
18c4ef1b58 split recorded string into 4 2024-06-05 13:24:55 +02:00
Luca Warmenhoven
c421fb2c41 Poepzaad 2024-06-05 13:24:51 +02:00
Niels Gras
6bed3441dd added arm raise movement 2024-06-05 13:23:57 +02:00
Luca Warmenhoven
9f72374f6a Merge remote-tracking branch 'origin/main'
# Conflicts:
#	code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/activities/FitnessActivity.java
2024-06-05 12:50:42 +02:00
Luca Warmenhoven
7782722310 Removed ExerciseStatusElement.java, moved all functionality to InputProcessor.java 2024-06-05 12:49:39 +02:00
SebasKoedam
8547fa563f Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-05 12:23:33 +02:00
SebasKoedam
2a0a08ee9e added progress circle with feedback to user how well they do the rep 2024-06-05 12:23:30 +02:00
Luca Warmenhoven
d46db1a525 Merge remote-tracking branch 'origin/main' 2024-06-05 11:44:57 +02:00
Luca Warmenhoven
20a2887401 Added JSON parsing for path instead of binary decoding 2024-06-05 11:44:52 +02:00
69003476ed Added correct file name extensions 2024-06-05 11:38:24 +02:00
4750b675f8 Update documentation 2024-06-05 11:37:50 +02:00
Luca Warmenhoven
0410b23c0d Fixed typo in FitnessActivity 2024-06-05 11:30:44 +02:00
Luca Warmenhoven
ae52d10041 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/activities/FitnessActivity.java
2024-06-05 11:30:03 +02:00
Luca Warmenhoven
f69fbe8e5b Updated InputProcessor's convertRecordedDataToString to JSON output, updated GesturePath -> AnglePath 2024-06-05 11:29:32 +02:00
Luca Warmenhoven
ef7e7ae55c Updated infrastructure-design.md 2024-06-04 17:40:02 +02:00
Luca Warmenhoven
cac78aecb8 Updated documentation 2024-06-04 17:27:27 +02:00
Luca Warmenhoven
1e3388a2c4 Updated documentation 2024-06-04 17:10:11 +02:00
Luca Warmenhoven
18d64ba24b Merge remote-tracking branch 'origin/main' 2024-06-04 16:58:10 +02:00
Luca Warmenhoven
4dad284ba0 Updated documentation 2024-06-04 16:58:06 +02:00
SebasKoedam
e75551671a added working loading circle 2024-06-04 16:24:54 +02:00
SebasKoedam
ad83c7e450 added loading icon while video is getting fetched 2024-06-04 15:20:47 +02:00
SebasKoedam
8a02bf1daa Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-04 15:16:23 +02:00
SebasKoedam
62c97c3475 updated UI 2024-06-04 15:16:21 +02:00
Luca Warmenhoven
f4b11dd4ee Updated documentation 2024-06-04 14:48:58 +02:00
Luca Warmenhoven
7aaa2da981 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	docs/documentation/diagrams/infrastructure.md
2024-06-04 14:43:06 +02:00
Luca Warmenhoven
3f560d9f47 Updated documentation 2024-06-04 14:42:30 +02:00
8cd2b00eb0 Fix automatic ip adress esp 2024-06-04 14:40:06 +02:00
7539892131 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-04 14:39:33 +02:00
af0cdf43de Reflectieopdracht 2024-06-04 14:39:10 +02:00
Luca Warmenhoven
79a96bc193 Fixed order 2024-06-04 14:18:04 +02:00
SebasKoedam
67fece4e2e Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-04 14:16:19 +02:00
SebasKoedam
d604a6ef84 chore: Update Fitbot launcher background color 2024-06-04 14:16:17 +02:00
Niels Gras
f64d7ff34e armraise 2024-06-04 13:47:02 +02:00
SebasKoedam
13b2b2f821 Fixed description size 2024-06-04 12:58:14 +02:00
SebasKoedam
c0aa0b46e9 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-04 12:31:30 +02:00
SebasKoedam
19e50eefea Refactor database query to fetch a specific exercise by ExerciseID 2024-06-04 12:31:29 +02:00
Niels Gras
ed1097bc00 added expert docs 2024-06-04 12:18:43 +02:00
Niels Gras
ae479087f7 ideas for fitbord docs 2024-06-04 12:17:36 +02:00
Niels Gras
761de7955d Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-04 12:02:31 +02:00
SebasKoedam
398389aa5e added comments and optimized code 2024-06-04 11:32:05 +02:00
0c98744bdd fix crashes and video player, changed loading elements to UI thread 2024-06-04 11:25:49 +02:00
cd00d36166 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-04 10:33:43 +02:00
3b65fffec8 motion processing stuff + logs + fix crash (luca) 2024-06-04 10:31:24 +02:00
Niels
2118680b27 removed wrong conclusion 2024-06-04 00:04:58 +02:00
Niels
3cfea7fc6f added the research? 2024-06-04 00:03:55 +02:00
Niels
930553ffea added dataprotocol research 2024-06-04 00:03:34 +02:00
Niels Gras
4273a43a1a fixed squat 2024-06-03 16:30:07 +02:00
SebasKoedam
d0d09aa2d2 Refactor FitnessActivity code to remove commented out video playback function 2024-06-03 16:28:56 +02:00
SebasKoedam
77875c45d6 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-03 16:25:36 +02:00
SebasKoedam
46ba5dbdbd video will now be displayed with link from database 2024-06-03 16:25:35 +02:00
ffb90c001d Refactoring 2024-06-03 16:17:27 +02:00
Niels Gras
452aad6929 added squat 2024-06-03 15:59:26 +02:00
Niels Gras
296d2f0fbf changed movement 2024-06-03 15:51:17 +02:00
Niels Gras
7264811444 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-03 15:32:34 +02:00
Niels Gras
d167aed8a6 added sound 2024-06-03 15:32:31 +02:00
Luca Warmenhoven
328cd2402a Merge remote-tracking branch 'origin/main' 2024-06-03 15:24:20 +02:00
Luca Warmenhoven
18ec63fcd1 Updated some stuff 2024-06-03 15:23:57 +02:00
Niels Gras
d46c0a8a92 changed file name 2024-06-03 15:18:59 +02:00
10b0421f90 Infrastructure update 2024-06-03 15:05:25 +02:00
e0794522b6 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-03 14:55:39 +02:00
f90bfb4d6e Update infrastructure 2024-06-03 14:55:36 +02:00
Luca Warmenhoven
b1bbe9531b Merge remote-tracking branch 'origin/main' 2024-06-03 14:55:27 +02:00
Luca Warmenhoven
627b50f7d5 Updated some stuff 2024-06-03 14:55:24 +02:00
SebasKoedam
f4fd183408 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-03 14:55:14 +02:00
SebasKoedam
85c6e4e918 feat: Add short description field to Exercise class 2024-06-03 14:55:13 +02:00
33a2f1ed70 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-03 14:48:26 +02:00
9639d6ba3b hardware docs update 2024-06-03 14:48:18 +02:00
Niels Gras
902cc184ee added arm circle movement 2024-06-03 14:47:51 +02:00
c0d002c46b Luca's attempt at fixing app 2024-06-03 14:47:31 +02:00
Niels Gras
7574a3eaea Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-03 14:32:00 +02:00
Niels Gras
f1464653b0 added comments 2024-06-03 14:31:39 +02:00
SebasKoedam
456b959c5e Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-03 14:28:42 +02:00
SebasKoedam
baffe8b9ac chore: Update activity_fitness.xml layout and fix bug in ExerciseManager 2024-06-03 14:28:00 +02:00
Luca Warmenhoven
926f369ff0 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/ExerciseManager.java
#	code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/activities/FitnessActivity.java
2024-06-03 14:27:34 +02:00
Luca Warmenhoven
868542dba9 Updated InputProcessor and FitnessActivity, fixed some issues. 2024-06-03 14:26:17 +02:00
53bc94aba3 Fixed it so it only pulls the ip once 2024-06-03 14:21:42 +02:00
Luca Warmenhoven
c084443799 Fixed database request handling 2024-06-03 14:13:06 +02:00
Luca Warmenhoven
9f2bb805f0 Merge remote-tracking branch 'origin/main' 2024-06-03 14:04:03 +02:00
SebasKoedam
67860a6397 chore: Add transparent color to colors.xml, fix bug in incoming_request_handlers.js, and add close button drawable and dialog layout files 2024-06-03 14:03:48 +02:00
Niels Gras
dde65dd2b9 small documentation for fitbord ideas 2024-06-03 13:51:57 +02:00
Luca Warmenhoven
882f07988d Merge remote-tracking branch 'origin/main' 2024-06-03 13:41:59 +02:00
Luca Warmenhoven
517b5f8438 Why 2024-06-03 13:41:10 +02:00
ab6010d517 Hardware documentation 2024-06-03 13:17:23 +02:00
cad5c8508e Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-06-03 12:56:31 +02:00
3145d3b3b0 Update esp server ip 2024-06-03 12:56:22 +02:00
b6353d15ba added endpoints for pepper and esp 2024-06-03 12:55:43 +02:00
99c68fae9a Update server ip adres in app 2024-06-03 12:55:34 +02:00
SebasKoedam
fc41cea618 fitness layout finished 2024-06-03 11:53:21 +02:00
594d0b91d0 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-31 16:36:58 +02:00
eda0601228 Added permissions to android manifest 2024-05-31 16:36:05 +02:00
a080b6c737 Script to pass ip adres from pepper to esp 2024-05-31 16:35:41 +02:00
Niels Gras
333317a9de Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-31 16:32:09 +02:00
Niels Gras
b9b4a9ca9b chore: Update Connectivity class with fetchIPAddress method 2024-05-31 16:32:06 +02:00
61dde95684 Added so pepper sends its ip to another ip 2024-05-31 16:07:39 +02:00
SebasKoedam
92223fbf52 fitness activity 2024-05-31 15:44:56 +02:00
Niels Gras
3db278f92c Add launcher background and icon resources 2024-05-31 13:06:11 +02:00
Niels Gras
8df96091b1 Merge remote-tracking branch 'origin/main' 2024-05-31 13:05:33 +02:00
Niels Gras
3a6edc2cf0 custom icon for app 2024-05-31 13:05:04 +02:00
SebasKoedam
58b466dd27 opmaak 2024-05-31 12:59:26 +02:00
bc3c720fc2 OOP 2024-05-31 12:58:04 +02:00
28a49950ba change ending from going to mainscreen to endscreen 2024-05-31 12:57:57 +02:00
SebasKoedam
e35e7bf6c6 spatie weg 2024-05-31 12:55:39 +02:00
SebasKoedam
d3404a8eb2 expert review prep 2024-05-31 12:55:23 +02:00
SebasKoedam
70b5b1078b Position tracking docs added 2024-05-31 12:09:22 +02:00
Luca Warmenhoven
84bdc7ca59 Renamed functions for clarity 2024-05-30 17:57:49 +02:00
Luca Warmenhoven
826ae8a9c7 Added motion recording functionality in InputProcessor (setRecording) and recorded data conversion to string for in the database (convertRecordedDataToString) 2024-05-30 17:41:06 +02:00
Luca Warmenhoven
3f37f44f22 Removed FitnessCycle, reformatted code, made Pepper actions globally accessible 2024-05-30 17:16:09 +02:00
Luca Warmenhoven
b4ce40ca7d Merge remote-tracking branch 'origin/main' 2024-05-30 16:38:56 +02:00
Luca Warmenhoven
f7e96cf356 Added Pepper abstraction for synchronous events to prevent app from crashing 2024-05-30 16:38:48 +02:00
SebasKoedam
985d0b5219 refactor: Update layout for FitnessActivity
This commit updates the layout for the FitnessActivity by making the following changes:
- Adjusted the width of the LinearLayout to wrap its content
- Added padding to the LinearLayout and its child views
- Updated the dimensions of the VideoView and PersonalMotionPreviewElement

These changes improve the visual presentation and alignment of the elements in the FitnessActivity layout.
2024-05-30 16:32:10 +02:00
SebasKoedam
fa48f71407 Added hideUI in nav Manager 2024-05-30 15:57:49 +02:00
Luca Warmenhoven
a0988bf8cc Merge remote-tracking branch 'origin/main' 2024-05-30 15:38:16 +02:00
Luca Warmenhoven
5c3b84b3ae Updated exercise handling code to make pepper more verbal 2024-05-30 15:38:11 +02:00
SebasKoedam
e61ed86ea9 feat: Add exercise details to API response
The code changes include adding the `exerciseId`, `shortDescription`, `path`, and `duration` fields to the API response for exercises. This provides more comprehensive information about each exercise to the client.

Note: The recent user commits and repository commits are not relevant for generating the commit message.
2024-05-30 15:35:43 +02:00
SebasKoedam
4bd1419a8b added new request handlers 2024-05-30 15:23:46 +02:00
562a863595 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-30 14:16:17 +02:00
18ae9f0768 Testkaart 2024-05-30 14:16:09 +02:00
1426e039d1 Issues with hardware 2024-05-30 14:16:04 +02:00
af490e6f2e Animations for pepper 2024-05-30 14:15:47 +02:00
045e7fbe91 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-30 14:14:41 +02:00
f656a61b98 Infrastructure diagram 2024-05-30 14:14:37 +02:00
Luca Warmenhoven
c6875d2ac7 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/activities/FitnessActivity.java
2024-05-30 14:12:31 +02:00
Luca Warmenhoven
e5c91b53f7 Updated motion handling, updated FitnessActivity to match motion handling 2024-05-30 14:11:16 +02:00
SebasKoedam
5685683aaf last ui changes 2024-05-30 12:36:15 +02:00
SebasKoedam
20b75278f0 Fixed button ids 2024-05-30 10:43:56 +02:00
SebasKoedam
17f40a7a07 Merge branch '59-als-student-wil-ik-dat-de-ui-in-mijn-app-overal-het-zelfde-is-en-in-het-nederlands-wordt' 2024-05-30 10:01:59 +02:00
SebasKoedam
5753f7047d finished all ui 2024-05-30 10:01:35 +02:00
Sebas Koedam
dc68acc2a5 daily updates 2024-05-30 08:37:58 +02:00
SebasKoedam
7b72554110 poepies 2024-05-29 18:34:53 +02:00
SebasKoedam
59c906918e added style for help menu 2024-05-29 18:31:03 +02:00
406e2843f4 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-29 17:56:59 +02:00
3e2a36c185 disabled accelerometer (use past commit for this script to work for app) 2024-05-29 17:56:47 +02:00
fbe392d511 removal of junk and changes made by luca 2024-05-29 17:34:24 +02:00
Niels Gras
9f17cf9d8b added docs about the usertest 2024-05-29 17:27:29 +02:00
SebasKoedam
7efdf3579e Added new style for fitness activity 2024-05-29 17:17:29 +02:00
f350e58fda Junk removal 2024-05-29 16:30:35 +02:00
SebasKoedam
447ef3a6af toolbar navigation button white 2024-05-29 16:30:24 +02:00
98c4df1ad5 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-29 16:18:56 +02:00
Luca Warmenhoven
2e8feb686b Updated PersonalMotionPreviewElement 2024-05-29 16:18:48 +02:00
SebasKoedam
426725a632 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 into 59-als-student-wil-ik-dat-de-ui-in-mijn-app-overal-het-zelfde-is-en-in-het-nederlands-wordt 2024-05-29 16:14:12 +02:00
SebasKoedam
4b46738bf0 fixed the main menu bars and theme 2024-05-29 16:12:37 +02:00
SebasKoedam
34dc294d06 fixed the main menu bars and theme 2024-05-29 16:12:23 +02:00
bceef3bde1 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-29 16:11:54 +02:00
Luca Warmenhoven
2426e7b2e2 Updated PersonalMotionPreviewElement 2024-05-29 16:11:43 +02:00
ba92ae62c7 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-29 16:06:15 +02:00
Luca Warmenhoven
6ffbb503c9 Added more logging for debugging functionality 2024-05-29 16:06:10 +02:00
8441097bf1 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-29 15:56:50 +02:00
9b71df061f change array 2024-05-29 15:56:04 +02:00
Luca Warmenhoven
bd9ace61e9 Added more logging for debugging functionality 2024-05-29 15:55:37 +02:00
Luca Warmenhoven
60a45fd510 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/components/PersonalMotionPreviewElement.java
2024-05-29 15:39:34 +02:00
Luca Warmenhoven
a6977b057c Added more logging for debugging functionality 2024-05-29 15:39:13 +02:00
7e60d5e5e6 fixed type error causing bootloop 2024-05-29 15:35:29 +02:00
Luca Warmenhoven
4270ecde7f Merge remote-tracking branch 'origin/main' 2024-05-29 15:22:49 +02:00
Luca Warmenhoven
3966824b76 Yebal 2024-05-29 15:22:39 +02:00
9ad44897ff optimization 2024-05-29 15:22:38 +02:00
0441133744 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-29 15:15:23 +02:00
c3329a4c52 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-29 15:15:14 +02:00
Niels Gras
4c8c9d9f32 Merge branch '57-als-gebruiker-wil-ik-een-uitleg-scherm-zodat-ik-kan-zien-wat-fitbot-inhoudt' into 'main'
Resolve "Als gebruiker wil ik een uitleg scherm zodat ik kan zien wat fitbot inhoudt."

Closes #57

See merge request propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66!13
2024-05-29 15:14:48 +02:00
Luca Warmenhoven
447a021b10 Added more logging for debugging functionality 2024-05-29 15:13:04 +02:00
49eb09b105 added logging 2024-05-29 15:12:27 +02:00
ea9a35030b qi.sdk unregister added 2024-05-29 15:12:18 +02:00
Niels Gras
940202d9f4 Edited help screen 2024-05-29 14:00:45 +02:00
Luca Warmenhoven
4983162ac9 Merge remote-tracking branch 'origin/main' 2024-05-29 13:41:00 +02:00
Luca Warmenhoven
95ed46d9ac cermit 2024-05-29 13:40:53 +02:00
SebasKoedam
d6fc5098dd Update database host to use IP address instead of localhost 2024-05-29 13:06:55 +02:00
SebasKoedam
b8e3e89bb2 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-29 13:04:59 +02:00
SebasKoedam
c362a41f06 added infrastructure documentation 2024-05-29 13:04:57 +02:00
Luca Warmenhoven
bd74b0b5aa Merge remote-tracking branch 'origin/main' 2024-05-29 12:17:48 +02:00
Luca Warmenhoven
d080f0af8d Updated incoming_request_handlers.js to match database querying 2024-05-29 12:17:33 +02:00
Niels
e4ee419e2d finished betoog 2024-05-28 21:39:25 +02:00
Niels
58c80ed60c Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-28 20:16:59 +02:00
Niels
f1570aaea9 added part of research 2024-05-28 20:16:56 +02:00
1a56a05409 Junk cleanup and new json formatting 2024-05-28 16:17:06 +02:00
cdd8ac9d49 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-28 16:11:09 +02:00
Luca Warmenhoven
3d01749aa2 Attempt to make good 2024-05-28 16:11:03 +02:00
004d216767 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-28 15:58:44 +02:00
Luca Warmenhoven
5789f4c0dd Attempt to make good 2024-05-28 15:58:25 +02:00
Luca Warmenhoven
5a226dd56b Attempt to make good 2024-05-28 15:56:28 +02:00
6961801a67 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-28 15:39:28 +02:00
Luca Warmenhoven
3c0e07336d Attempt to make good 2024-05-28 15:37:26 +02:00
48848de44d Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-28 15:28:21 +02:00
Luca Warmenhoven
c527289c68 Attempt to make good 2024-05-28 15:28:09 +02:00
83b233e275 dead code removal 2024-05-28 15:16:04 +02:00
Luca Warmenhoven
80ef0ac99e Pep crack cocaine 2024-05-28 15:06:54 +02:00
Luca Warmenhoven
565d19ec00 Pep crack cocaine 2024-05-28 15:04:17 +02:00
Luca Warmenhoven
62e1320b3c Pep crack cocaine 2024-05-28 15:00:48 +02:00
Luca Warmenhoven
31135d1aa7 poep 2024-05-28 14:36:48 +02:00
Luca Warmenhoven
4c9a256d6c Pep crack cocaine 2024-05-28 14:15:30 +02:00
bcfc622c90 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-28 14:08:19 +02:00
9397028c1b Added port config 2024-05-28 14:08:12 +02:00
Luca Warmenhoven
d9c05b2975 But crack 2024-05-28 14:08:12 +02:00
Luca Warmenhoven
8c1e4332aa Commit balls 2024-05-28 13:50:35 +02:00
Luca Warmenhoven
eb6ffcf4c8 Merge remote-tracking branch 'origin/main' 2024-05-28 13:47:09 +02:00
Luca Warmenhoven
976d5b1ef1 Gitter Committer Crack balls 2024-05-28 13:46:59 +02:00
Niels Gras
20906379d3 tekst to string 2024-05-28 13:04:58 +02:00
Niels Gras
1b955baf6b added help tekst 2024-05-28 13:01:42 +02:00
df8a7a6395 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-28 12:59:35 +02:00
f66f167812 Refactor package import in FitnessCycle.java 2024-05-28 12:59:31 +02:00
1a086a9f57 added issues about hardware 2024-05-28 12:59:04 +02:00
2be0efc37e Disabled websocket in favour of other protocol 2024-05-28 12:58:01 +02:00
Niels Gras
fcb5c7f61b Made the buttons functional and cleaned up start button in main 2024-05-28 12:44:48 +02:00
Niels Gras
c3cf6e3cf9 styled help activity 2024-05-28 12:33:01 +02:00
Luca Warmenhoven
d1e0c5b08e Crack butt 2024-05-28 12:12:34 +02:00
Luca Warmenhoven
29944bce57 Crack butt 2024-05-28 12:07:07 +02:00
Luca Warmenhoven
caa7599518 Commit war crimes in formal Yugoslavia 2024-05-28 11:53:28 +02:00
Luca Warmenhoven
652d7c501d Merge remote-tracking branch 'origin/main' 2024-05-28 11:47:46 +02:00
Luca Warmenhoven
b85219d013 Commit crack cocaine 2024-05-28 11:47:42 +02:00
SebasKoedam
774329699a chore: Remove unused sections and update professional skills in skillOntwikkelplan.md 2024-05-28 10:17:13 +02:00
SebasKoedam
7090bccdb8 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-28 10:10:29 +02:00
SebasKoedam
4a53ea1420 eerste versie onderzoek 2024-05-28 10:10:28 +02:00
fc47353e98 junk uit betoog gehaald 2024-05-28 00:02:18 +02:00
74d6cda049 Spelfouten en betoog afgemaakt 2024-05-28 00:00:37 +02:00
ebd6ae7a12 betoog 2024-05-27 23:20:05 +02:00
Niels
d7e22dac6e updated skillsontwikkelings plan and added assets folder for personal docs 2024-05-26 01:10:47 +02:00
Luca Warmenhoven
8d5cecce27 updated gay 2024-05-25 19:34:58 +02:00
Luca Warmenhoven
ff5d1ed31f killed my brain doing literature 2024-05-25 19:31:13 +02:00
SebasKoedam
8b02096a98 chore: Update image path in sprint report 2024-05-25 11:27:05 +02:00
SebasKoedam
d69701b60d added missing image 2024-05-25 11:16:35 +02:00
Niels Gras
a62b46fcf9 added retro image 2024-05-24 14:36:43 +02:00
SebasKoedam
856f0af4b2 chore: Update image path in sprint report 2024-05-24 14:32:42 +02:00
Niels Gras
5462a6fbcc Added help activity 2024-05-24 13:41:53 +02:00
dd91639fb2 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-24 12:27:11 +02:00
02c2cff330 updated lateralraises animation 2024-05-24 12:24:58 +02:00
1fb1d5d02d Added class and intergrated it into code 2024-05-24 12:24:48 +02:00
82731ee176 added library and videoview 2024-05-24 12:24:24 +02:00
Luca Warmenhoven
04bdf656f4 Merge remote-tracking branch 'origin/main' 2024-05-24 12:20:53 +02:00
Luca Warmenhoven
38e70e3b53 Fixed more shit 2024-05-24 12:20:49 +02:00
Niels Gras
a8e7f6d8b8 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-24 12:04:45 +02:00
Niels Gras
f96d6ec394 chore: Update navigation menu with Colors research page 2024-05-24 12:04:43 +02:00
Luca Warmenhoven
f5900bf50e Merge remote-tracking branch 'origin/main' 2024-05-24 11:52:17 +02:00
Luca Warmenhoven
04054c862b Fixed some shit and removed ugly ass shit 2024-05-24 11:52:12 +02:00
3ee81d0e48 fitnesscycle class it plays the animation a given amount of reps 2024-05-24 11:29:40 +02:00
Luca Warmenhoven
cb53000eb3 Added NodeJS Server files 2024-05-24 10:53:14 +02:00
fdfb216617 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-23 19:57:26 +02:00
1a62421c90 added comment to animation class 2024-05-23 19:56:39 +02:00
SebasKoedam
25f9f098b0 improved main and fitness layout 2024-05-23 18:09:43 +02:00
SebasKoedam
9795ccb490 removed unsed files 2024-05-23 18:09:19 +02:00
SebasKoedam
8cc571bb3b Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-23 15:51:34 +02:00
SebasKoedam
58f8ff0054 chore: Update activity_main.xml and misc.xml 2024-05-23 15:50:53 +02:00
b4a69ed975 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-23 15:31:45 +02:00
869164b2d6 docs about robotMovement 2024-05-23 15:31:30 +02:00
73f563249e fixed last error 2024-05-23 14:20:53 +02:00
3f6f61fb27 corrected pages 2024-05-23 14:09:01 +02:00
71871661ca Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-23 13:44:05 +02:00
062a793552 Updated pages 2024-05-23 13:43:55 +02:00
Niels
372beceeae spel fouten gefixt in persoonlijke reflectie 2024-05-22 17:20:35 +02:00
Niels
b0caed783f persoonlijke reflectie 2024-05-22 17:19:36 +02:00
9925fcd637 edited code for video 2024-05-22 15:50:43 +02:00
40cf9f37fc made video work using ffmpeg 2024-05-22 15:50:27 +02:00
Niels Gras
981b4670e3 Merge remote-tracking branch 'origin/main' 2024-05-22 15:06:37 +02:00
Niels Gras
390bd3c667 changed video format 2024-05-22 15:06:28 +02:00
6d79b0f762 kinda fix for main activity still needs better layout 2024-05-22 15:03:16 +02:00
Niels Gras
60747d07c5 Merge branch '55-als-gebruiker-wil-ik-oefeningen-te-zien-krijgen-met-een-instructie-video-zodat-ik-weet-wat-ik' into 'main'
Fixed crashing errors

Closes #55

See merge request propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66!11
2024-05-22 14:57:56 +02:00
Niels Gras
60fa1cec2c Fixed crashing errors 2024-05-22 14:47:01 +02:00
Niels Gras
54df52736f Merge branch '55-als-gebruiker-wil-ik-oefeningen-te-zien-krijgen-met-een-instructie-video-zodat-ik-weet-wat-ik' into 'main'
Resolve "Als gebruiker wil ik oefeningen te zien krijgen met een instructie video zodat ik weet wat ik moet doen"

Closes #55

See merge request propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66!9
2024-05-22 14:20:55 +02:00
Niels Gras
bc8763927b chore: Update background color in activity_fitness.xml 2024-05-22 14:20:26 +02:00
Niels Gras
5552865fd2 Merge branch '55-als-gebruiker-wil-ik-oefeningen-te-zien-krijgen-met-een-instructie-video-zodat-ik-weet-wat-ik' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 into 55-als-gebruiker-wil-ik-oefeningen-te-zien-krijgen-met-een-instructie-video-zodat-ik-weet-wat-ik 2024-05-22 14:19:37 +02:00
Niels Gras
bcf394ef29 test 2024-05-22 14:12:29 +02:00
SebasKoedam
fdd67d3e7e stipje weggehaald 2024-05-22 11:54:21 +02:00
SebasKoedam
4a904be8f0 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-22 11:45:22 +02:00
SebasKoedam
904e4e98ed reflectie blok 1,2 en 3 skill ontwikkeling 2024-05-22 11:45:21 +02:00
Luca Warmenhoven
f72879d66e Merge remote-tracking branch 'origin/main' 2024-05-22 11:48:13 +03:00
Luca Warmenhoven
7064fa3b97 Updated PersonalMotionPreviewElement and FitnessActivity to match functionality 2024-05-22 11:48:02 +03:00
SebasKoedam
37ed64cd50 added daily tasks 2024-05-22 10:44:25 +02:00
Luca Warmenhoven
53d5e48b9b Merge remote-tracking branch 'origin/main'
# Conflicts:
#	code/src/Fitbot/app/src/main/java/com/example/fitbot/EndScreenActivity.java
#	code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/activities/FitnessActivity.java
#	code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml
2024-05-22 11:03:11 +03:00
Luca Warmenhoven
ccaf302558 store 2024-05-22 11:01:18 +03:00
Luca Warmenhoven
64412a849a store 2024-05-22 10:51:41 +03:00
Luca Warmenhoven
5432b0656e Added Skills Ontwikkelings Plan.docx 2024-05-22 10:42:34 +03:00
Luca Warmenhoven
03c14d12eb Merge remote-tracking branch 'origin/main' 2024-05-22 10:41:43 +03:00
Luca Warmenhoven
3826adb891 nonsense 2024-05-22 10:41:25 +03:00
f97686aa74 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-21 22:19:52 +02:00
cb3c4ca99f reflectieopdracht 2024-05-21 22:19:36 +02:00
d1f5f76eea Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-21 22:16:28 +02:00
851541923c junk removal 2024-05-21 22:16:23 +02:00
Niels
bbe3a8127c Expert sprint 2 2024-05-21 17:43:24 +02:00
Niels Gras
5d966ea3b9 feat: Add personal reflection documentation for each block 2024-05-21 15:52:46 +02:00
f288535c44 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-21 15:34:12 +02:00
183d5b826b Research sensors 2024-05-21 15:34:09 +02:00
Niels Gras
fc06974af1 feat: Update import statement for EndScreenActivity in FitnessActivity 2024-05-21 15:25:23 +02:00
Niels Gras
831fd06489 refactor: Move EndScreenActivity to ui.activities package 2024-05-21 15:24:02 +02:00
Niels Gras
9f87fb5e6f Merge branch '55-als-gebruiker-wil-ik-oefeningen-te-zien-krijgen-met-een-instructie-video-zodat-ik-weet-wat-ik' into 'main'
Resolve "Als gebruiker wil ik oefeningen te zien krijgen met een instructie video zodat ik weet wat ik moet doen"

Closes #55

See merge request propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66!4
2024-05-21 15:22:56 +02:00
Niels Gras
ab82bdce43 Fixed crashing errors 2024-05-21 15:20:41 +02:00
Niels Gras
1edaf096b2 feat: Add personal reflection documentation for each block 2024-05-21 14:26:00 +02:00
Niels Gras
af596ea67c Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 into 55-als-gebruiker-wil-ik-oefeningen-te-zien-krijgen-met-een-instructie-video-zodat-ik-weet-wat-ik 2024-05-21 14:21:05 +02:00
Niels Gras
d08e8dd50f added placeholder video 2024-05-21 14:20:22 +02:00
Niels Gras
f50f332664 added a ButtonNavigation class 2024-05-21 14:11:41 +02:00
8e92cbee7d Merge branch '51-als-gebruiker-wil-ik-dat-pepper-mee-beweegt-tijdens-oefeningen-zodat-ik-meer-motivatie-heb-om' 2024-05-21 13:50:50 +02:00
Niels Gras
d718046402 added video player and media player 2024-05-21 13:03:34 +02:00
bad3346475 fixed minsdk so it can actually be uploaded to robot 2024-05-21 12:54:20 +02:00
Niels Gras
e00b15480c Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 into 55-als-gebruiker-wil-ik-oefeningen-te-zien-krijgen-met-een-instructie-video-zodat-ik-weet-wat-ik 2024-05-21 12:49:43 +02:00
Niels Gras
a854c9b5e1 changed background 2024-05-21 12:48:43 +02:00
Niels Gras
ba0ae4c6b7 fixed build errors 2024-05-21 12:43:12 +02:00
Luca Warmenhoven
0bdd1664dc crack cocaine and sport activities 2024-05-21 12:31:45 +02:00
59d7c4f1ec Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-21 12:31:15 +02:00
Niels Gras
c398f8ff70 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 into 55-als-gebruiker-wil-ik-oefeningen-te-zien-krijgen-met-een-instructie-video-zodat-ik-weet-wat-ik 2024-05-21 12:14:43 +02:00
Niels Gras
3e791f8ac0 added skip button 2024-05-21 12:13:33 +02:00
SebasKoedam
67045ed342 Merge branch '53-als-gebruiker-wil-ik-dat-mijn-bewegingen-op-het-wii-fit-board-worden-gemeten-zodat-dit-gebruikt' 2024-05-21 11:25:19 +02:00
SebasKoedam
29c5e99017 chore: Add skill development plan documentation 2024-05-21 10:21:50 +02:00
SebasKoedam
a901c0f205 feat: Remove unused code and update Arduino board configuration 2024-05-20 15:31:25 +02:00
SebasKoedam
14f46775dd feat: Update FitBot architecture diagrams 2024-05-20 15:19:23 +02:00
SebasKoedam
536c8c75af feat: Update FitBot architecture diagrams 2024-05-20 14:27:30 +02:00
180817d073 Set correct name 2024-05-20 12:34:24 +02:00
4f57b87265 Added source 2024-05-20 12:33:51 +02:00
90487db6f0 Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-20 12:31:12 +02:00
7b1a1f3f2b personaldocs 2024-05-20 12:31:08 +02:00
Niels Gras
f87e4e5309 Fixed contrain 2024-05-17 16:06:02 +02:00
83a471ab06 Basic syntax diagram 2024-05-17 16:03:41 +02:00
72ca6bc77b Fix typos in sensors.md 2024-05-17 15:59:39 +02:00
Niels Gras
a62c4e1b77 Fixed layout for fitness screen 2024-05-17 15:53:59 +02:00
Luca Warmenhoven
1fea68d90a Merge remote-tracking branch 'origin/main' 2024-05-17 15:28:49 +02:00
Luca Warmenhoven
368067eb8b Updated manifest 2024-05-17 15:28:43 +02:00
Niels Gras
d0ed34ec95 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 into 55-als-gebruiker-wil-ik-oefeningen-te-zien-krijgen-met-een-instructie-video-zodat-ik-weet-wat-ik 2024-05-17 15:12:33 +02:00
Niels Gras
60bdf860d3 chore: Update activity_fitness.xml layout for Fitbot app 2024-05-17 15:11:42 +02:00
Luca Warmenhoven
6e8a66e327 Merge 2024-05-17 15:03:54 +02:00
Luca Warmenhoven
fb63b1364a Merge remote-tracking branch 'refs/remotes/origin/35-als-gebruiker-wil-ik-live-mijn-bewegingen-doen-zodat-ik-kan-inzien-of-ik-het-goed-doe' 2024-05-17 15:03:20 +02:00
Niels Gras
aa33bf2f12 Merge branch '54-als-gebruiker-wil-ik-een-scherm-waar-ik-mijn-score-kan-zien-na-de-oefeningen-zodat-ik-een' into 'main'
Resolve "Als gebruiker wil ik een scherm waar ik mijn score kan zien na de oefeningen zodat ik een inzicht heb van wat ik heb gedaan"

Closes #54

See merge request propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66!5
2024-05-17 13:34:08 +02:00
Niels Gras
2fdc8a7189 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 into 54-als-gebruiker-wil-ik-een-scherm-waar-ik-mijn-score-kan-zien-na-de-oefeningen-zodat-ik-een 2024-05-17 13:33:32 +02:00
Niels Gras
6b40c5c079 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 2024-05-17 13:32:17 +02:00
Niels Gras
6720b2af3d Added new drawable and layout files for Fitbot app 2024-05-17 13:31:59 +02:00
Niels Gras
f9e340a500 Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66 into 54-als-gebruiker-wil-ik-een-scherm-waar-ik-mijn-score-kan-zien-na-de-oefeningen-zodat-ik-een 2024-05-17 13:30:47 +02:00
SebasKoedam
7dc0c7bc72 feat: Update FitBot architecture diagrams
The FitBot architecture diagrams have been updated to include a new version of the architecture diagram and a deployment diagram. These diagrams provide a visual representation of the infrastructure of FitBot.
2024-05-17 12:44:53 +02:00
SebasKoedam
031d766205 added docs voor expert 2 2024-05-17 12:35:55 +02:00
Niels
866484c85b fixed color 2024-05-16 23:32:48 +02:00
Niels
87e8b725e4 Added curves on endscreen 2024-05-16 23:24:09 +02:00
SebasKoedam
54cf012288 i tried :(((((((((((((((((((((((((((((((((((( 2024-05-16 14:30:57 +02:00
SebasKoedam
01498b5643 Code is able to discover bluetooth devices but cant connect to the balance board 2024-05-16 11:30:10 +02:00
Niels Gras
5cab887429 Add AndroidStyles.md file and update activity_end_screen.xml button ID 2024-05-15 16:09:14 +02:00
Niels Gras
5dbbacd140 Update button ID in activity_end_screen.xml 2024-05-15 16:09:05 +02:00
Niels Gras
0f2f174ea9 Add AndroidStyles.md file for documenting Android styles and themes 2024-05-15 15:33:56 +02:00
Niels Gras
f06287d562 Added new XML files for vcs and modules configuration 2024-05-15 14:54:16 +02:00
Niels Gras
c8d90c0992 Added new XML file for rectangle drawable and renamed activity_completion_screen.xml to activity_end_screen.xml 2024-05-15 14:54:06 +02:00
215 changed files with 7652 additions and 2785 deletions

8
.gitignore vendored
View File

@@ -1 +1,9 @@
.DS_Store
/.idea/.gitignore
/.idea/dictionaries/lucawarm.xml
/.idea/material_theme_project_new.xml
/docs/documentation/assets/math-expression-location-calculation.png
/.idea/modules.xml
/.idea/muupooviixee66.iml
/.idea/vcs.xml
/node_modules/

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/muupooviixee66-3.iml" filepath="$PROJECT_DIR$/.idea/muupooviixee66-3.iml" />
</modules>
</component>
</project>

9
.idea/muupooviixee66-3.iml generated Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

181
.idea/workspace.xml generated
View File

@@ -14,9 +14,9 @@
</configurations>
</component>
<component name="ChangeListManager">
<list default="true" id="00599d5b-7eb5-44da-ad7f-98bf42384c16" name="Changes" comment="Updated onderzoek-voorbeeld.md &amp; motion-tracking-system-analysis.md">
<list default="true" id="00599d5b-7eb5-44da-ad7f-98bf42384c16" name="Changes" comment="Yebal">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/documentation/research-questions/motion-tracking-system-analysis.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/documentation/research-questions/motion-tracking-system-analysis.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/code/server/incoming_request_handlers.js" beforeDir="false" afterPath="$PROJECT_DIR$/code/server/incoming_request_handlers.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -48,6 +48,8 @@
<list>
<option value="Interface" />
<option value="Class" />
<option value="package.json" />
<option value="JavaScript File" />
</list>
</option>
</component>
@@ -74,8 +76,7 @@
<option name="stateVersion" value="1" />
</component>
<component name="ProjectColorInfo">{
&quot;customColor&quot;: &quot;&quot;,
&quot;associatedIndex&quot;: 7
&quot;associatedIndex&quot;: 5
}</component>
<component name="ProjectId" id="2fE3N2CwEPDo9wBtexBLxU20tCJ" />
<component name="ProjectLevelVcsManager">
@@ -87,17 +88,15 @@
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;Node.js.pepper_data_test.js.executor&quot;: &quot;Run&quot;,
&quot;git-widget-placeholder&quot;: &quot;main&quot;,
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;/Users/lucawarm/Jetbrains/Android Studio/muupooviixee66&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.lookFeel&quot;,
&quot;ts.external.directory.path&quot;: &quot;/Applications/WebStorm.app/Contents/plugins/javascript-plugin/jsLanguageServicesImpl/external&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}</component>
@@ -106,7 +105,7 @@
<recent name="$PROJECT_DIR$/code/src/app/src/main/java/com/fitbot" />
</key>
</component>
<component name="RunManager">
<component name="RunManager" selected="Node.js.pepper_data_test.js">
<configuration name="Fitbot" type="AndroidRunConfigurationType" factoryName="Android App">
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
@@ -115,16 +114,40 @@
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="CLEAR_APP_STORAGE" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Java" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Hybrid>
<Java />
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_PROFILING_ENABLED" value="false" />
@@ -139,6 +162,14 @@
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
<method v="2" />
</configuration>
<configuration name="pepper_data_test.js" type="NodeJSConfigurationType" temporary="true" nameIsGenerated="true" path-to-js-file="$PROJECT_DIR$/code/web/pepper_data_test.js" working-dir="$PROJECT_DIR$/code/web">
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Node.js.pepper_data_test.js" />
</list>
</recent_temporary>
</component>
<component name="SharedIndexes">
<attachedChunks>
@@ -166,6 +197,23 @@
<workItem from="1715765990621" duration="8538000" />
<workItem from="1715777647522" duration="725000" />
<workItem from="1715779408605" duration="3840000" />
<workItem from="1715957538891" duration="2000" />
<workItem from="1716126955744" duration="1102000" />
<workItem from="1716286107331" duration="6057000" />
<workItem from="1716308427931" duration="28000" />
<workItem from="1716318640952" duration="7000" />
<workItem from="1716363591734" duration="658000" />
<workItem from="1716538507910" duration="2194000" />
<workItem from="1716547378856" duration="243000" />
<workItem from="1716648462646" duration="8555000" />
<workItem from="1716674767699" duration="21000" />
<workItem from="1716889548355" duration="3475000" />
<workItem from="1716904079045" duration="2259000" />
<workItem from="1716977405893" duration="466000" />
<workItem from="1716983084935" duration="4041000" />
<workItem from="1716992784136" duration="136000" />
<workItem from="1717093210968" duration="6000" />
<workItem from="1717416227033" duration="368000" />
</task>
<task id="LOCAL-00001" summary="Changes">
<created>1713528225837</created>
@@ -259,7 +307,103 @@
<option name="project" value="LOCAL" />
<updated>1715780873394</updated>
</task>
<option name="localTasksCounter" value="13" />
<task id="LOCAL-00013" summary="Merge">
<option name="closed" value="true" />
<created>1715951036170</created>
<option name="number" value="00013" />
<option name="presentableId" value="LOCAL-00013" />
<option name="project" value="LOCAL" />
<updated>1715951036170</updated>
</task>
<task id="LOCAL-00014" summary="nonsense">
<option name="closed" value="true" />
<created>1716363685668</created>
<option name="number" value="00014" />
<option name="presentableId" value="LOCAL-00014" />
<option name="project" value="LOCAL" />
<updated>1716363685669</updated>
</task>
<task id="LOCAL-00015" summary="Added Skills Ontwikkelings Plan.docx">
<option name="closed" value="true" />
<created>1716363757016</created>
<option name="number" value="00015" />
<option name="presentableId" value="LOCAL-00015" />
<option name="project" value="LOCAL" />
<updated>1716363757016</updated>
</task>
<task id="LOCAL-00016" summary="Added NodeJS Server files">
<option name="closed" value="true" />
<created>1716540796495</created>
<option name="number" value="00016" />
<option name="presentableId" value="LOCAL-00016" />
<option name="project" value="LOCAL" />
<updated>1716540796495</updated>
</task>
<task id="LOCAL-00017" summary="killed my brain doing literature">
<option name="closed" value="true" />
<created>1716658275320</created>
<option name="number" value="00017" />
<option name="presentableId" value="LOCAL-00017" />
<option name="project" value="LOCAL" />
<updated>1716658275320</updated>
</task>
<task id="LOCAL-00018" summary="updated gay">
<option name="closed" value="true" />
<created>1716658499589</created>
<option name="number" value="00018" />
<option name="presentableId" value="LOCAL-00018" />
<option name="project" value="LOCAL" />
<updated>1716658499589</updated>
</task>
<task id="LOCAL-00019" summary="Commit crack cocaine">
<option name="closed" value="true" />
<created>1716889664199</created>
<option name="number" value="00019" />
<option name="presentableId" value="LOCAL-00019" />
<option name="project" value="LOCAL" />
<updated>1716889664199</updated>
</task>
<task id="LOCAL-00020" summary="Commit war crimes in formal Yugoslavia">
<option name="closed" value="true" />
<created>1716890009616</created>
<option name="number" value="00020" />
<option name="presentableId" value="LOCAL-00020" />
<option name="project" value="LOCAL" />
<updated>1716890009616</updated>
</task>
<task id="LOCAL-00021" summary="Crack butt">
<option name="closed" value="true" />
<created>1716890828736</created>
<option name="number" value="00021" />
<option name="presentableId" value="LOCAL-00021" />
<option name="project" value="LOCAL" />
<updated>1716890828736</updated>
</task>
<task id="LOCAL-00022" summary="Crack butt">
<option name="closed" value="true" />
<created>1716891155110</created>
<option name="number" value="00022" />
<option name="presentableId" value="LOCAL-00022" />
<option name="project" value="LOCAL" />
<updated>1716891155110</updated>
</task>
<task id="LOCAL-00023" summary="Updated incoming_request_handlers.js to match database querying">
<option name="closed" value="true" />
<created>1716977853269</created>
<option name="number" value="00023" />
<option name="presentableId" value="LOCAL-00023" />
<option name="project" value="LOCAL" />
<updated>1716977853269</updated>
</task>
<task id="LOCAL-00024" summary="Yebal">
<option name="closed" value="true" />
<created>1716988959836</created>
<option name="number" value="00024" />
<option name="presentableId" value="LOCAL-00024" />
<option name="project" value="LOCAL" />
<updated>1716988959836</updated>
</task>
<option name="localTasksCounter" value="25" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -290,6 +434,17 @@
<MESSAGE value="Renamed files, added motion-tracking-system-analysis.md" />
<MESSAGE value="Updated onderzoek-voorbeeld.md and motion-tracking-system-analysis.md" />
<MESSAGE value="Updated onderzoek-voorbeeld.md &amp; motion-tracking-system-analysis.md" />
<option name="LAST_COMMIT_MESSAGE" value="Updated onderzoek-voorbeeld.md &amp; motion-tracking-system-analysis.md" />
<MESSAGE value="Merge" />
<MESSAGE value="nonsense" />
<MESSAGE value="Added Skills Ontwikkelings Plan.docx" />
<MESSAGE value="Added NodeJS Server files" />
<MESSAGE value="killed my brain doing literature" />
<MESSAGE value="updated gay" />
<MESSAGE value="Commit crack cocaine" />
<MESSAGE value="Commit war crimes in formal Yugoslavia" />
<MESSAGE value="Crack butt" />
<MESSAGE value="Updated incoming_request_handlers.js to match database querying" />
<MESSAGE value="Yebal" />
<option name="LAST_COMMIT_MESSAGE" value="Yebal" />
</component>
</project>

4
.vscode/arduino.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"port": "COM3",
"board": "esp32:esp32:esp32s3"
}

593
.vscode/c_cpp_properties.json vendored Normal file
View File

@@ -0,0 +1,593 @@
{
"version": 4,
"configurations": [
{
"name": "Arduino",
"compilerPath": "C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32s3-elf-gcc\\esp-2021r2-patch5-8.4.0\\bin\\xtensa-esp32s3-elf-g++",
"compilerArgs": [
"-mlongcalls",
"-ffunction-sections",
"-fdata-sections",
"-Wno-error=unused-function",
"-Wno-error=unused-variable",
"-Wno-error=deprecated-declarations",
"-Wno-unused-parameter",
"-Wno-sign-compare",
"-freorder-blocks",
"-Wwrite-strings",
"-fstack-protector",
"-fstrict-volatile-bitfields",
"-Wno-error=unused-but-set-variable",
"-fno-jump-tables",
"-fno-tree-switch-conversion",
"-std=gnu++11",
"-fexceptions",
"-fno-rtti"
],
"intelliSenseMode": "gcc-x64",
"includePath": [
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\newlib\\platform_include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\freertos\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\freertos\\include\\esp_additions\\freertos",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\freertos\\port\\xtensa\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\freertos\\include\\esp_additions",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_hw_support\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_hw_support\\include\\soc",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_hw_support\\include\\soc\\esp32s3",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_hw_support\\port\\esp32s3",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_hw_support\\port\\esp32s3\\private_include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\heap\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\log\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\lwip\\include\\apps",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\lwip\\include\\apps\\sntp",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\lwip\\lwip\\src\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\lwip\\port\\esp32\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\lwip\\port\\esp32\\include\\arch",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\soc\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\soc\\esp32s3",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\soc\\esp32s3\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\hal\\esp32s3\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\hal\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\hal\\platform_port\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_rom\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_rom\\include\\esp32s3",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_rom\\esp32s3",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_common\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_system\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_system\\port\\soc",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_system\\port\\public_compat",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\xtensa\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\xtensa\\esp32s3\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\driver\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\driver\\esp32s3\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_pm\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_ringbuf\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\efuse\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\efuse\\esp32s3\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\vfs\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_wifi\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_event\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_netif\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_eth\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\tcpip_adapter\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_phy\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_phy\\esp32s3\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_ipc\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\app_trace\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_timer\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\mbedtls\\port\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\mbedtls\\mbedtls\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\mbedtls\\esp_crt_bundle\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\app_update\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\spi_flash\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bootloader_support\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\nvs_flash\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\pthread\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_gdbstub\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_gdbstub\\xtensa",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_gdbstub\\esp32s3",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espcoredump\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espcoredump\\include\\port\\xtensa",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\wpa_supplicant\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\wpa_supplicant\\port\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\wpa_supplicant\\esp_supplicant\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\ieee802154\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\console",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\asio\\asio\\asio\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\asio\\port\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\common\\osi\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\include\\esp32c3\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\common\\api\\include\\api",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\common\\btc\\profile\\esp\\blufi\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\common\\btc\\profile\\esp\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\host\\bluedroid\\api\\include\\api",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\mesh_common\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\mesh_common\\tinycrypt\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\mesh_core",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\mesh_core\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\mesh_core\\storage",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\btc\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\mesh_models\\common\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\mesh_models\\client\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\mesh_models\\server\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\api\\core\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\api\\models\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\bt\\esp_ble_mesh\\api",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\cbor\\port\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\unity\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\unity\\unity\\src",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\cmock\\CMock\\src",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\coap\\port\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\coap\\libcoap\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\nghttp\\port\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\nghttp\\nghttp2\\lib\\includes",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-tls",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-tls\\esp-tls-crypto",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_adc_cal\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_hid\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\tcp_transport\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_http_client\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_http_server\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_https_ota\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_https_server\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_lcd\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_lcd\\interface",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\protobuf-c\\protobuf-c",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\protocomm\\include\\common",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\protocomm\\include\\security",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\protocomm\\include\\transports",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\mdns\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_local_ctrl\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\sdmmc\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_serial_slave_link\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_websocket_client\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\expat\\expat\\expat\\lib",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\expat\\port\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\wear_levelling\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\fatfs\\diskio",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\fatfs\\vfs",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\fatfs\\src",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\freemodbus\\freemodbus\\common\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\idf_test\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\idf_test\\include\\esp32s3",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\jsmn\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\json\\cJSON",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\libsodium\\libsodium\\src\\libsodium\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\libsodium\\port_include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\mqtt\\esp-mqtt\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\openssl\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\perfmon\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\spiffs\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\usb\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\ulp\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\wifi_provisioning\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\rmaker_common\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_diagnostics\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\rtc_store\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_insights\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\json_parser\\upstream\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\json_parser\\upstream",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\json_generator\\upstream",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_schedule\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp_secure_cert_mgr\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_rainmaker\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\gpio_button\\button\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\qrcode\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\ws2812_led",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\freertos\\include\\freertos",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\arduino_tinyusb\\tinyusb\\src",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\arduino_tinyusb\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp_littlefs\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-dl\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-dl\\include\\tool",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-dl\\include\\typedef",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-dl\\include\\image",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-dl\\include\\math",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-dl\\include\\nn",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-dl\\include\\layer",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-dl\\include\\detect",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp-dl\\include\\model_zoo",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp32-camera\\driver\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\esp32-camera\\conversions\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\dotprod\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\support\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\support\\mem\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\windows\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\windows\\hann\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\windows\\blackman\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\windows\\blackman_harris\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\windows\\blackman_nuttall\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\windows\\nuttall\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\windows\\flat_top\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\iir\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\fir\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\math\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\math\\add\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\math\\sub\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\math\\mul\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\math\\addc\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\math\\mulc\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\math\\sqrt\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\matrix\\mul\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\matrix\\add\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\matrix\\addc\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\matrix\\mulc\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\matrix\\sub\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\matrix\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\fft\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\dct\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\conv\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\common\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\matrix\\mul\\test\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\kalman\\ekf\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\espressif__esp-dsp\\modules\\kalman\\ekf_imu13states\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\include\\fb_gfx\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\tools\\sdk\\esp32s3\\qio_qspi\\include",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\cores\\esp32",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\variants\\esp32s3",
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\libraries\\BLE\\src",
"c:\\users\\sebas\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32s3-elf-gcc\\esp-2021r2-patch5-8.4.0\\xtensa-esp32s3-elf\\include\\c++\\8.4.0",
"c:\\users\\sebas\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32s3-elf-gcc\\esp-2021r2-patch5-8.4.0\\xtensa-esp32s3-elf\\include\\c++\\8.4.0\\xtensa-esp32s3-elf",
"c:\\users\\sebas\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32s3-elf-gcc\\esp-2021r2-patch5-8.4.0\\xtensa-esp32s3-elf\\include\\c++\\8.4.0\\backward",
"c:\\users\\sebas\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32s3-elf-gcc\\esp-2021r2-patch5-8.4.0\\lib\\gcc\\xtensa-esp32s3-elf\\8.4.0\\include",
"c:\\users\\sebas\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32s3-elf-gcc\\esp-2021r2-patch5-8.4.0\\lib\\gcc\\xtensa-esp32s3-elf\\8.4.0\\include-fixed",
"c:\\users\\sebas\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32s3-elf-gcc\\esp-2021r2-patch5-8.4.0\\xtensa-esp32s3-elf\\sys-include",
"c:\\users\\sebas\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32s3-elf-gcc\\esp-2021r2-patch5-8.4.0\\xtensa-esp32s3-elf\\include"
],
"forcedInclude": [
"C:\\Users\\sebas\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.16\\cores\\esp32\\Arduino.h"
],
"cStandard": "c11",
"cppStandard": "c++11",
"defines": [
"HAVE_CONFIG_H",
"MBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"",
"UNITY_INCLUDE_CONFIG_H",
"WITH_POSIX",
"_GNU_SOURCE",
"IDF_VER=\"v4.4.7-dirty\"",
"ESP_PLATFORM",
"_POSIX_READER_WRITER_LOCKS",
"F_CPU=240000000L",
"ARDUINO=10607",
"ARDUINO_ESP32S3_DEV",
"ARDUINO_ARCH_ESP32",
"ARDUINO_BOARD=\"ESP32S3_DEV\"",
"ARDUINO_VARIANT=\"esp32s3\"",
"ARDUINO_PARTITION_default",
"ESP32",
"CORE_DEBUG_LEVEL=0",
"ARDUINO_RUNNING_CORE=1",
"ARDUINO_EVENT_RUNNING_CORE=1",
"ARDUINO_USB_MODE=1",
"ARDUINO_USB_CDC_ON_BOOT=0",
"ARDUINO_USB_MSC_ON_BOOT=0",
"ARDUINO_USB_DFU_ON_BOOT=0",
"__DBL_MIN_EXP__=(-1021)",
"__FLT32X_MAX_EXP__=1024",
"__cpp_attributes=200809",
"__UINT_LEAST16_MAX__=0xffff",
"__ATOMIC_ACQUIRE=2",
"__FLT_MIN__=1.1754943508222875e-38F",
"__GCC_IEC_559_COMPLEX=0",
"__cpp_aggregate_nsdmi=201304",
"__UINT_LEAST8_TYPE__=unsigned char",
"__INTMAX_C(c)=c ## LL",
"__CHAR_BIT__=8",
"__UINT8_MAX__=0xff",
"__WINT_MAX__=0xffffffffU",
"__FLT32_MIN_EXP__=(-125)",
"__cpp_static_assert=200410",
"__ORDER_LITTLE_ENDIAN__=1234",
"__SIZE_MAX__=0xffffffffU",
"__WCHAR_MAX__=0xffff",
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1",
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1",
"__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1",
"__DBL_DENORM_MIN__=double(4.9406564584124654e-324L)",
"__GCC_ATOMIC_CHAR_LOCK_FREE=2",
"__GCC_IEC_559=0",
"__FLT32X_DECIMAL_DIG__=17",
"__FLT_EVAL_METHOD__=0",
"__cpp_binary_literals=201304",
"__FLT64_DECIMAL_DIG__=17",
"__GCC_ATOMIC_CHAR32_T_LOCK_FREE=2",
"__cpp_variadic_templates=200704",
"__UINT_FAST64_MAX__=0xffffffffffffffffULL",
"__SIG_ATOMIC_TYPE__=int",
"__DBL_MIN_10_EXP__=(-307)",
"__FINITE_MATH_ONLY__=0",
"__cpp_variable_templates=201304",
"__GNUC_PATCHLEVEL__=0",
"__FLT32_HAS_DENORM__=1",
"__UINT_FAST8_MAX__=0xffffffffU",
"__has_include(STR)=__has_include__(STR)",
"__DEC64_MAX_EXP__=385",
"__INT8_C(c)=c",
"__INT_LEAST8_WIDTH__=8",
"__UINT_LEAST64_MAX__=0xffffffffffffffffULL",
"__SHRT_MAX__=0x7fff",
"__LDBL_MAX__=1.7976931348623157e+308L",
"__UINT_LEAST8_MAX__=0xff",
"__GCC_ATOMIC_BOOL_LOCK_FREE=2",
"__UINTMAX_TYPE__=long long unsigned int",
"__DEC32_EPSILON__=1E-6DF",
"__FLT_EVAL_METHOD_TS_18661_3__=0",
"__CHAR_UNSIGNED__=1",
"__UINT32_MAX__=0xffffffffU",
"__GXX_EXPERIMENTAL_CXX0X__=1",
"__LDBL_MAX_EXP__=1024",
"__WINT_MIN__=0U",
"__INT_LEAST16_WIDTH__=16",
"__SCHAR_MAX__=0x7f",
"__WCHAR_MIN__=0",
"__INT64_C(c)=c ## LL",
"__DBL_DIG__=15",
"__GCC_ATOMIC_POINTER_LOCK_FREE=2",
"__SIZEOF_INT__=4",
"__SIZEOF_POINTER__=4",
"__GCC_ATOMIC_CHAR16_T_LOCK_FREE=2",
"__USER_LABEL_PREFIX__",
"__STDC_HOSTED__=1",
"__LDBL_HAS_INFINITY__=1",
"__XTENSA_EL__=1",
"__FLT32_DIG__=6",
"__FLT_EPSILON__=1.1920928955078125e-7F",
"__GXX_WEAK__=1",
"__SHRT_WIDTH__=16",
"__LDBL_MIN__=2.2250738585072014e-308L",
"__DEC32_MAX__=9.999999E96DF",
"__cpp_threadsafe_static_init=200806",
"__FLT32X_HAS_INFINITY__=1",
"__INT32_MAX__=0x7fffffff",
"__INT_WIDTH__=32",
"__SIZEOF_LONG__=4",
"__UINT16_C(c)=c",
"__PTRDIFF_WIDTH__=32",
"__DECIMAL_DIG__=17",
"__FLT64_EPSILON__=2.2204460492503131e-16F64",
"__INTMAX_WIDTH__=64",
"__FLT64_MIN_EXP__=(-1021)",
"__has_include_next(STR)=__has_include_next__(STR)",
"__LDBL_HAS_QUIET_NAN__=1",
"__FLT64_MANT_DIG__=53",
"__GNUC__=8",
"__GXX_RTTI=1",
"__cpp_delegating_constructors=200604",
"__FLT_HAS_DENORM__=1",
"__SIZEOF_LONG_DOUBLE__=8",
"__BIGGEST_ALIGNMENT__=16",
"__STDC_UTF_16__=1",
"__FLT64_MAX_10_EXP__=308",
"__FLT32_HAS_INFINITY__=1",
"__DBL_MAX__=double(1.7976931348623157e+308L)",
"__cpp_raw_strings=200710",
"__INT_FAST32_MAX__=0x7fffffff",
"__DBL_HAS_INFINITY__=1",
"__DEC32_MIN_EXP__=(-94)",
"__INTPTR_WIDTH__=32",
"__FLT32X_HAS_DENORM__=1",
"__INT_FAST16_TYPE__=int",
"__LDBL_HAS_DENORM__=1",
"__cplusplus=201402L",
"__cpp_ref_qualifiers=200710",
"__DEC128_MAX__=9.999999999999999999999999999999999E6144DL",
"__INT_LEAST32_MAX__=0x7fffffff",
"__DEC32_MIN__=1E-95DF",
"__DEPRECATED=1",
"__cpp_rvalue_references=200610",
"__DBL_MAX_EXP__=1024",
"__WCHAR_WIDTH__=16",
"__FLT32_MAX__=3.4028234663852886e+38F32",
"__DEC128_EPSILON__=1E-33DL",
"__PTRDIFF_MAX__=0x7fffffff",
"__FLT32_HAS_QUIET_NAN__=1",
"__GNUG__=8",
"__LONG_LONG_MAX__=0x7fffffffffffffffLL",
"__SIZEOF_SIZE_T__=4",
"__cpp_rvalue_reference=200610",
"__cpp_nsdmi=200809",
"__SIZEOF_WINT_T__=4",
"__LONG_LONG_WIDTH__=64",
"__cpp_initializer_lists=200806",
"__FLT32_MAX_EXP__=128",
"__cpp_hex_float=201603",
"__GXX_ABI_VERSION=1013",
"__FLT_MIN_EXP__=(-125)",
"__cpp_lambdas=200907",
"__INT_FAST64_TYPE__=long long int",
"__FP_FAST_FMAF=1",
"__FLT64_DENORM_MIN__=4.9406564584124654e-324F64",
"__DBL_MIN__=double(2.2250738585072014e-308L)",
"__FLT32X_EPSILON__=2.2204460492503131e-16F32x",
"__FLT64_MIN_10_EXP__=(-307)",
"__DEC128_MIN__=1E-6143DL",
"__REGISTER_PREFIX__",
"__UINT16_MAX__=0xffff",
"__DBL_HAS_DENORM__=1",
"__FLT32_MIN__=1.1754943508222875e-38F32",
"__UINT8_TYPE__=unsigned char",
"__NO_INLINE__=1",
"__FLT_MANT_DIG__=24",
"__LDBL_DECIMAL_DIG__=17",
"__VERSION__=\"8.4.0\"",
"__UINT64_C(c)=c ## ULL",
"__cpp_unicode_characters=200704",
"__cpp_decltype_auto=201304",
"__GCC_ATOMIC_INT_LOCK_FREE=2",
"__FLT32_MANT_DIG__=24",
"__FLOAT_WORD_ORDER__=__ORDER_LITTLE_ENDIAN__",
"__SCHAR_WIDTH__=8",
"__INT32_C(c)=c",
"__DEC64_EPSILON__=1E-15DD",
"__ORDER_PDP_ENDIAN__=3412",
"__DEC128_MIN_EXP__=(-6142)",
"__FLT32_MAX_10_EXP__=38",
"__INT_FAST32_TYPE__=int",
"__UINT_LEAST16_TYPE__=short unsigned int",
"__INT16_MAX__=0x7fff",
"__cpp_rtti=199711",
"__SIZE_TYPE__=unsigned int",
"__UINT64_MAX__=0xffffffffffffffffULL",
"__INT8_TYPE__=signed char",
"__cpp_digit_separators=201309",
"__ELF__=1",
"__xtensa__=1",
"__FLT_RADIX__=2",
"__INT_LEAST16_TYPE__=short int",
"__LDBL_EPSILON__=2.2204460492503131e-16L",
"__UINTMAX_C(c)=c ## ULL",
"__SIG_ATOMIC_MAX__=0x7fffffff",
"__GCC_ATOMIC_WCHAR_T_LOCK_FREE=2",
"__SIZEOF_PTRDIFF_T__=4",
"__FLT32X_MANT_DIG__=53",
"__FLT32X_MIN_EXP__=(-1021)",
"__DEC32_SUBNORMAL_MIN__=0.000001E-95DF",
"__INT_FAST16_MAX__=0x7fffffff",
"__FLT64_DIG__=15",
"__UINT_FAST32_MAX__=0xffffffffU",
"__UINT_LEAST64_TYPE__=long long unsigned int",
"__FLT_HAS_QUIET_NAN__=1",
"__FLT_MAX_10_EXP__=38",
"__LONG_MAX__=0x7fffffffL",
"__DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL",
"__FLT_HAS_INFINITY__=1",
"__cpp_unicode_literals=200710",
"__UINT_FAST16_TYPE__=unsigned int",
"__DEC64_MAX__=9.999999999999999E384DD",
"__INT_FAST32_WIDTH__=32",
"__CHAR16_TYPE__=short unsigned int",
"__PRAGMA_REDEFINE_EXTNAME=1",
"__SIZE_WIDTH__=32",
"__INT_LEAST16_MAX__=0x7fff",
"__DEC64_MANT_DIG__=16",
"__INT64_MAX__=0x7fffffffffffffffLL",
"__UINT_LEAST32_MAX__=0xffffffffU",
"__FLT32_DENORM_MIN__=1.4012984643248171e-45F32",
"__GCC_ATOMIC_LONG_LOCK_FREE=2",
"__SIG_ATOMIC_WIDTH__=32",
"__INT_LEAST64_TYPE__=long long int",
"__INT16_TYPE__=short int",
"__INT_LEAST8_TYPE__=signed char",
"__DEC32_MAX_EXP__=97",
"__INT_FAST8_MAX__=0x7fffffff",
"__INTPTR_MAX__=0x7fffffff",
"__cpp_sized_deallocation=201309",
"__cpp_range_based_for=200907",
"__FLT64_HAS_QUIET_NAN__=1",
"__FLT32_MIN_10_EXP__=(-37)",
"__EXCEPTIONS=1",
"__LDBL_MANT_DIG__=53",
"__DBL_HAS_QUIET_NAN__=1",
"__FLT64_HAS_INFINITY__=1",
"__SIG_ATOMIC_MIN__=(-__SIG_ATOMIC_MAX__ - 1)",
"__cpp_return_type_deduction=201304",
"__INTPTR_TYPE__=int",
"__UINT16_TYPE__=short unsigned int",
"__WCHAR_TYPE__=short unsigned int",
"__SIZEOF_FLOAT__=4",
"__UINTPTR_MAX__=0xffffffffU",
"__INT_FAST64_WIDTH__=64",
"__DEC64_MIN_EXP__=(-382)",
"__cpp_decltype=200707",
"__FLT32_DECIMAL_DIG__=9",
"__INT_FAST64_MAX__=0x7fffffffffffffffLL",
"__GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1",
"__FLT_DIG__=6",
"__UINT_FAST64_TYPE__=long long unsigned int",
"__INT_MAX__=0x7fffffff",
"__INT64_TYPE__=long long int",
"__FLT_MAX_EXP__=128",
"__DBL_MANT_DIG__=53",
"__cpp_inheriting_constructors=201511",
"__INT_LEAST64_MAX__=0x7fffffffffffffffLL",
"__FP_FAST_FMAF32=1",
"__DEC64_MIN__=1E-383DD",
"__WINT_TYPE__=unsigned int",
"__UINT_LEAST32_TYPE__=unsigned int",
"__SIZEOF_SHORT__=2",
"__LDBL_MIN_EXP__=(-1021)",
"__FLT64_MAX__=1.7976931348623157e+308F64",
"__WINT_WIDTH__=32",
"__INT_LEAST8_MAX__=0x7f",
"__FLT32X_MAX_10_EXP__=308",
"__WCHAR_UNSIGNED__=1",
"__LDBL_MAX_10_EXP__=308",
"__ATOMIC_RELAXED=0",
"__DBL_EPSILON__=double(2.2204460492503131e-16L)",
"__XTENSA_WINDOWED_ABI__=1",
"__UINT8_C(c)=c",
"__FLT64_MAX_EXP__=1024",
"__INT_LEAST32_TYPE__=int",
"__SIZEOF_WCHAR_T__=2",
"__INT_FAST8_TYPE__=int",
"__GNUC_STDC_INLINE__=1",
"__FLT64_HAS_DENORM__=1",
"__FLT32_EPSILON__=1.1920928955078125e-7F32",
"__DBL_DECIMAL_DIG__=17",
"__STDC_UTF_32__=1",
"__INT_FAST8_WIDTH__=32",
"__DEC_EVAL_METHOD__=2",
"__FLT32X_MAX__=1.7976931348623157e+308F32x",
"__XTENSA__=1",
"__ORDER_BIG_ENDIAN__=4321",
"__cpp_runtime_arrays=198712",
"__UINT64_TYPE__=long long unsigned int",
"__UINT32_C(c)=c ## U",
"__INTMAX_MAX__=0x7fffffffffffffffLL",
"__cpp_alias_templates=200704",
"__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__",
"__FLT_DENORM_MIN__=1.4012984643248171e-45F",
"__INT8_MAX__=0x7f",
"__LONG_WIDTH__=32",
"__UINT_FAST32_TYPE__=unsigned int",
"__CHAR32_TYPE__=unsigned int",
"__FLT_MAX__=3.4028234663852886e+38F",
"__cpp_constexpr=201304",
"__INT32_TYPE__=int",
"__SIZEOF_DOUBLE__=8",
"__cpp_exceptions=199711",
"__FLT_MIN_10_EXP__=(-37)",
"__FLT64_MIN__=2.2250738585072014e-308F64",
"__INT_LEAST32_WIDTH__=32",
"__INTMAX_TYPE__=long long int",
"__DEC128_MAX_EXP__=6145",
"__FLT32X_HAS_QUIET_NAN__=1",
"__ATOMIC_CONSUME=1",
"__GNUC_MINOR__=4",
"__INT_FAST16_WIDTH__=32",
"__UINTMAX_MAX__=0xffffffffffffffffULL",
"__DEC32_MANT_DIG__=7",
"__FLT32X_DENORM_MIN__=4.9406564584124654e-324F32x",
"__DBL_MAX_10_EXP__=308",
"__LDBL_DENORM_MIN__=4.9406564584124654e-324L",
"__INT16_C(c)=c",
"__cpp_generic_lambdas=201304",
"__STDC__=1",
"__FLT32X_DIG__=15",
"__PTRDIFF_TYPE__=int",
"__ATOMIC_SEQ_CST=5",
"__UINT32_TYPE__=unsigned int",
"__FLT32X_MIN_10_EXP__=(-307)",
"__UINTPTR_TYPE__=unsigned int",
"__DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD",
"__DEC128_MANT_DIG__=34",
"__LDBL_MIN_10_EXP__=(-307)",
"__SIZEOF_LONG_LONG__=8",
"__cpp_user_defined_literals=200809",
"__GCC_ATOMIC_LLONG_LOCK_FREE=1",
"__FLT32X_MIN__=2.2250738585072014e-308F32x",
"__LDBL_DIG__=15",
"__FLT_DECIMAL_DIG__=9",
"__UINT_FAST16_MAX__=0xffffffffU",
"__GCC_ATOMIC_SHORT_LOCK_FREE=2",
"__INT_LEAST64_WIDTH__=64",
"__UINT_FAST8_TYPE__=unsigned int",
"__cpp_init_captures=201304",
"__ATOMIC_ACQ_REL=4",
"__ATOMIC_RELEASE=3",
"USBCON"
]
}
]
}

View File

@@ -1,3 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
"java.configuration.updateBuildConfiguration": "disabled"
}

View File

@@ -4,20 +4,68 @@ void Connectivity::connectWiFi(char* ssid, char* pass){
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) {
Serial.println("connecting to wifi");
delay(1000);
}
Serial.println(WiFi.localIP());
}
void Connectivity::websocketSetup(char* ip, uint16_t port, char* adress){
//ws server address, port and URL
webSocket.begin(ip , port, adress);
// try every 500 again if connection has failed
webSocket.setReconnectInterval(500);
// void Connectivity::websocketSetup(char* ip, uint16_t port, char* adress){
// //ws server address, port and URL
// webSocket.begin(ip , port, adress);
// // try every 500 again if connection has failed
// webSocket.setReconnectInterval(500);
// }
// void Connectivity::sendData(float roll, float pitch, float yaw){
// String message = "{\"Sensor\": 1, \"roll\":\"" + String(roll) + "\",\"pitch\":\"" + String(pitch) + "\",\"yaw\":\"" + String(yaw) + "\"}";
// webSocket.sendTXT(message);
// }
const char* getServerURL = "http://145.92.8.132:443/get-ip";
String ipAddress = ""; // string that will hold the server's IP address
/** Fetch the IP address of pepper from the server */
const char* Connectivity::fetchIPAddress() {
char* ipAddress = NULL; // Declare ipAddress as a char*
if (WiFi.status() == WL_CONNECTED) {
HTTPClient http;
WiFiClient client;
http.begin(client, getServerURL);
int httpCode = http.GET();
if (httpCode > 0) {
if (httpCode == HTTP_CODE_OK) {
// If successful (code 200), read the response body and parse the IP address
String response = http.getString();
StaticJsonDocument<200> doc;
deserializeJson(doc, response);
const char* ip = doc["ip"]; // Extract the IP address
ipAddress = strdup(ip);
}
} else {
Serial.printf("GET request failed, error: %s\n", http.errorToString(httpCode).c_str());
}
void Connectivity::sendData(float roll, float pitch, float yaw){
String message = "{\"Sensor\": 1, \"roll\":\"" + String(roll) + "\",\"pitch\":\"" + String(pitch) + "\",\"yaw\":\"" + String(yaw) + "\"}";
webSocket.sendTXT(message);
http.end();
} else {
Serial.println("WiFi not connected");
}
return ipAddress;
}
/** Send a POST request to a server with provided data */
int Connectivity::httpPost(const char *serverAddress, const char *serverSubPath, const unsigned short serverPort,
const char *data, const size_t dataLength, const char *contentType)
{
WiFiClient wifi_client; // Ensure WiFiClient is declared and initialized
if (wifi_client.connect(serverAddress, serverPort)) {
wifi_client.printf("POST %s HTTP/1.1\r\n", serverSubPath);
wifi_client.printf("Content-Type: %s\r\n", contentType);
wifi_client.printf("Content-Length: %d\r\n", dataLength);
wifi_client.printf("Host: %s\r\n\n", serverAddress);
wifi_client.println(data);
wifi_client.stop();
return 0;
}
return 1;
}

View File

@@ -1,30 +1,33 @@
#ifndef Connectivity_h
#define Connectivity_h
#ifndef MOVEMENTSENSORCODE_CONNECTIVITY_h
#define MOVEMENTSENSORCODE_CONNECTIVITY_h
#include "Arduino.h"
#include <WebSocketsClient.h>
#include <ArduinoWiFiServer.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFiGeneric.h>
#include <ESP8266WiFiGratuitous.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266WiFiSTA.h>
#include <ESP8266WiFiScan.h>
#include <ESP8266WiFiType.h>
#include <WiFiClient.h>
#include <WiFiServer.h>
#include <WiFiServerSecure.h>
#include <WiFiUdp.h>
#include <WiFiClientSecure.h>
#include <ArduinoJson.h>
// declare the class Connectivity with all functions
class Connectivity {
public:
void connectWiFi(char* ssid, char* pass);
void websocketSetup(char* ip, uint16_t port, char* adress);
void sendData(float roll, float pitch, float yaw);
int httpPost(const char *serverAddress, const char *serverSubPath, const unsigned short serverPort, const char *data, const size_t dataLength, const char *contentType);
const char* fetchIPAddress();
private:
ESP8266WiFiMulti wifi;
WebSocketsClient webSocket;
WiFiClient wifi_client;
// WebSocketsClient webSocket;
};
#endif
#endif // MOVEMENTSENSORCODE_CONNECTIVITY_h

View File

@@ -1,62 +1,47 @@
#include "headerFile.h"
SensorManager::Rotation offset;
void setup() {
Serial.begin(9600);
Serial.println("startup");
//connect to internet and start sensor
connectivity.connectWiFi(ssid, pass);
sensorManager.sensorSetup();
//ws server address, port and URL
webSocket.begin("145.3.245.22", 8001, "");
// try every 500 again if connection has failed
webSocket.setReconnectInterval(500);
}
void loop() {
SensorManager::Rotation rotation = sensorManager.readLoop();
//get data from sensor
SensorManager::eulerAngles Rotation = sensorManager.getEulerAngles();
// Subtract offset
rotation.i -= offset.i;
rotation.j -= offset.j;
rotation.k -= offset.k;
rotation.w -= offset.w;
//static structure
// TODO: redo json for esp8266 and in android studio
struct acceleration {
float x = 9;
float y = 9;
float z = 9;
} accelData;
// Convert quaternion to Euler angles in radians
float roll = atan2(2.0f * (rotation.w * rotation.i + rotation.j * rotation.k), 1.0f - 2.0f * (rotation.i * rotation.i + rotation.j * rotation.j));
float pitch = asin(2.0f * (rotation.w * rotation.j - rotation.k * rotation.i));
float yaw = atan2(2.0f * (rotation.w * rotation.k + rotation.i * rotation.j), 1.0f - 2.0f * (rotation.j * rotation.j + rotation.k * rotation.k));
// Convert to degrees
float rollDegrees = roll * 180.0f / PI;
float pitchDegrees = pitch * 180.0f / PI;
float yawDegrees = yaw * 180.0f / PI;
Serial.print(roll);
Serial.print(" ");
Serial.print(pitch);
Serial.print(" ");
Serial.print(yaw);
sendData(roll, pitch, yaw);
Serial.println();
webSocket.loop();
if (Serial.available()) {
String command = Serial.readStringUntil('\n');
command.trim(); // remove any trailing whitespace
if (command == "setZeroPoint") {
setZeroPoint();
}
}
}
void setZeroPoint() {
offset = sensorManager.readLoop();
if (!ipAquired) {
serverIp = connectivity.fetchIPAddress(); //Fetch pepper ip address
ipAquired = true;
}
void sendData(float roll, float pitch, float yaw){
String message = "{\"Sensor\": 1, \"roll\":\"" + String(roll) + "\",\"pitch\":\"" + String(pitch) + "\",\"yaw\":\"" + String(yaw) + "\"}";
webSocket.sendTXT(message);
unsigned long lastTime = 0; // will store the last time the code was run
unsigned long currentTime = millis();
if (currentTime - lastTime >= 100) { // do everything inside every 100 ms
memset(buffer, 0, BUFFER_SIZE);
//convert string to char*
sprintf(
buffer,
"{\"deviceId\": %d, \"rotationX\": %f, \"rotationY\": %f, \"rotationZ\": %f, \"accelerationX\": %f, \"accelerationY\": %f, \"accelerationZ\": %f, \"type\": %s}",
DEVICE_ID,
Rotation.roll,
Rotation.pitch,
Rotation.yaw,
accelData.x,
accelData.y,
accelData.z,
"data");
// %d = int, %f = floatation, %s = string
//send data to pepper
connectivity.httpPost(serverIp, "/", 3445, buffer, strlen(buffer), "application/json");
lastTime = currentTime;
}
}

View File

@@ -5,47 +5,64 @@
SensorManager::SensorManager() {}
void SensorManager::sensorSetup() {
Wire.setClockStretchLimit(150000L); // Default stretch limit 150mS
Wire.begin();
//wait for the sensor to start before continue
if (myIMU.begin() == false) {
delay(1000);
Serial.println(".");
}
//start sensorfunction and start autocalibration
//once calibration is enabled it attempts to every 5 min
Wire.setClock(400000); //Increase I2C data rate to 400kHz
myIMU.calibrateAll(); //Turn on cal for Accel, Gyro, and Mag
myIMU.enableGyroIntegratedRotationVector(100); //send data every 100ms
myIMU.enableMagnetometer(100); //Send data update every 100ms
myIMU.saveCalibration(); //Saves the current dynamic calibration data (DCD) to memory
myIMU.requestCalibrationStatus(); //Sends command to get the latest calibration status
if (myIMU.calibrationComplete() == true) {
Serial.println("Calibration data successfully stored");
// myIMU.enableAccelerometer(100); //Send data update every 100ms
// myIMU.enableStepCounter(500); //Send data update every 500ms
}
Serial.println(F("magnetometer rotation enabled"));
}
SensorManager::Rotation SensorManager::readLoop() {
//get sensordata
SensorManager::RotationQuaternions SensorManager::getQuaternions() {
if (myIMU.dataAvailable() == true) {
float i = myIMU.getQuatI();
float j = myIMU.getQuatJ();
float k = myIMU.getQuatK();
float w = myIMU.getQuatReal();
Rotation rotation = { i, j, k, w };
RotationQuaternions rotation = { i, j, k, w };
return rotation;
}
else {
} else {
float i = myIMU.getQuatI();
float j = myIMU.getQuatJ();
float k = myIMU.getQuatK();
float w = myIMU.getQuatReal();
Rotation rotation = { i, j, k, w };
RotationQuaternions rotation = { i, j, k, w };
return rotation;
}
}
//calculate Quaternions to Euler angles from -1π to +1π
SensorManager::eulerAngles SensorManager::getEulerAngles() {
SensorManager::RotationQuaternions rotation = getQuaternions();
float roll = atan2(2.0f * (rotation.w * rotation.i + rotation.j * rotation.k), 1.0f - 2.0f * (rotation.i * rotation.i + rotation.j * rotation.j));
float pitch = asin(2.0f * (rotation.w * rotation.j - rotation.k * rotation.i));
float yaw = atan2(2.0f * (rotation.w * rotation.k + rotation.i * rotation.j), 1.0f - 2.0f * (rotation.j * rotation.j + rotation.k * rotation.k));
eulerAngles EulerAngles = { roll, pitch, yaw };
return EulerAngles;
}
SensorManager::acceleration SensorManager::getAcelleration() {
float x = myIMU.getAccelX();
float y = myIMU.getAccelY();
float z = myIMU.getAccelZ();
acceleration Acceleration = { x, y, z };
return Acceleration;
}
bool SensorManager::sensorTap() {
int taps = 0;
if (myIMU.dataAvailable() == true) {
int taps = myIMU.getStepCount();
}
if (taps) {
return true;
}
else {
return false;
}
}

View File

@@ -1,22 +1,40 @@
#ifndef SensorManager_h
#define SensorManager_h
#ifndef MOVEMENTSENSORCODE_SENSORMANAGER_H
#define MOVEMENTSENSORCODE_SENSORMANAGER_H
#include "Arduino.h"
#include "SparkFun_BNO080_Arduino_Library.h"
// declare the class SensorManager with all functions
class SensorManager {
public:
SensorManager();
void sensorSetup();
struct Rotation {
struct eulerAngles {
float roll;
float pitch;
float yaw;
};
struct acceleration {
float x;
float y;
float z;
};
// void sendData(float roll, float pitch, float yaw);
eulerAngles getEulerAngles();
acceleration getAcelleration();
bool sensorTap();
private:
struct RotationQuaternions {
float i;
float j;
float k;
float w;
};
Rotation readLoop();
private:
RotationQuaternions getQuaternions(); // get the quaternions from the sensor
BNO080 myIMU;
};
#endif
#endif // MOVEMENTSENSORCODE_SENSORMANAGER_H

View File

@@ -8,6 +8,11 @@ Connectivity connectivity;
WebSocketsClient webSocket;
#define USE_SERIAL Serial
#define ssid "1235678i"
#define pass "12345678"
#define BUFFER_SIZE 1024
#define DEVICE_ID 0
char *buffer = (char *)malloc(sizeof(char) * BUFFER_SIZE);
const char* serverIp = NULL; // Declare serverIp here
bool ipAquired = false;

View File

@@ -0,0 +1,65 @@
const databaseQuery = 'SELECT * FROM `Exercise` WHERE ExerciseID = 1';
// const databaseQueryRand = 'SELECT * FROM `Exercise` ORDER BY RAND() LIMIT 1';
/**
*
* @param {Request} request The incoming request
* @param {Response} response The response to send back
* @param {Express} app Express app instance
* @param {Pool} pool MariaDB pool instance
*/
function handleIncoming(request, response, app, pool)
{
// Acquire database connection
pool.getConnection()
.then(conn => {
conn.query(
databaseQuery)
.then(rows => {
if (rows.length === 0)
{
response
.status(404)
.send(JSON.stringify({error: 'No exercises found in the database.'}));
}
else
{
let row = rows[0];
response.status(200)
.send(JSON.stringify({
exerciseId: row['ExerciseID'],
name: row['Name'],
muscleGroup: row['MuscleGroup'],
shortDescription: row['ShortDescription'],
description: row['Description'],
imageUrl: row['ImageURL'],
videoUrl: row['VideoURL'],
path: row['Path'],
duration: row['Duration']
}))
}
})
.catch(error => {
console.log(error);
response
.status(500)
.send(JSON.stringify({error: 'Internal server error (Querying)'}));
})
.finally(() => {
conn.end();
});
})
.catch(error => {
console.log(error);
response
.status(500)
.send(JSON.stringify({error: 'Internal server error (Connection)'}));
});
}
// Export the function that registers the incoming request handlers
module.exports = function(app, pool) {
app.post('/', (req, res) => handleIncoming(req, res, app, pool));
};

View File

@@ -0,0 +1,22 @@
const express = require('express');
const app = express();
app.use(express.json()); // for parsing application/json
let ipAddress = ''; // to store the received IP address
// endpoint to receive an IP address from an external source
app.post('/set-ip', (req, res) => {
ipAddress = req.body.ip;
console.log('IP address received:', ipAddress);
});
// endpoint for the ESP32 to fetch the IP address
app.get('/get-ip', (req, res) => {
res.json({ ip: ipAddress });
console.log('IP address sent to ESP32');
});
app.listen(42069, () => {
console.log('Server is running on port 42069');
});

41
code/server/server.js Normal file
View File

@@ -0,0 +1,41 @@
const mariadb = require('mariadb');
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
app.use(bodyParser.json());
const serverPort = 3000;
const databaseCredentials = {
host: '127.0.0.1',
user: 'fitbot',
password: 'fitbot123',
database: 'fitbot',
connectionLimit: 5,
allowUnauthorized: true
};
// Create connection pool
const pool = mariadb.createPool(databaseCredentials);
// Register incoming HTTP request handlers
require('./incoming_request_handlers')(app, pool);
let ipAddress = ''; // to store the received IP address
// endpoint to receive an IP address from an external source
app.post('/set-ip', (req, res) => {
ipAddress = req.body.ip;
console.log('IP address received:', ipAddress);
});
// endpoint for the ESP32 to fetch the IP address
app.get('/get-ip', (req, res) => {
res.json({ ip: ipAddress });
console.log('IP address sent to ESP32');
});
// Start server
app.listen(serverPort, () => {
console.log(`Server running on port ${serverPort}`);
});

View File

@@ -0,0 +1,8 @@
// config.js
module.exports = {
host: '127.0.0.1',
user: 'fitbot',
password: 'fitbot123',
database: 'fitbot',
port: 3306, // Default MariaDB port
};

View File

@@ -0,0 +1,35 @@
const express = require('express');
const mariadb = require('mariadb');
const config = require('./config');
const app = express();
const port = 443; // Use port 443
const pool = mariadb.createPool({
host: config.host,
user: config.user,
password: config.password,
database: config.database,
connectionLimit: 5,
acquireTimeout: 30000, // Increase timeout to 30 seconds
});
app.get('/', async (req, res) => {
let conn;
try {
conn = await pool.getConnection();
console.log("Connected to MariaDB!");
const rows = await conn.query("SELECT * FROM Exercise ORDER BY RAND() LIMIT 1");
console.log(rows); // [{val: 1}]
res.json(rows); // Send the result as JSON response
} catch (err) {
console.error("Unable to connect to MariaDB:", err);
res.status(500).send("Unable to connect to MariaDB");
} finally {
if (conn) conn.release(); // Release the connection back to the pool
}
});
app.listen(port, '145.92.8.132', () => {
console.log(`Server is listening on http://145.92.8.132:${port}`);
});

View File

@@ -15,3 +15,4 @@
local.properties
.idea
.vscode
/.idea/

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\sebas\.android\avd\Pepper_1.9_API_29.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-04-26T10:10:48.222593700Z" />
</component>
</project>

View File

@@ -4,24 +4,58 @@
<option name="filePathToZoomLevelMap">
<map>
<entry key="../../../../../../../../layout/custom_preview.xml" value="0.35989583333333336" />
<entry key="../../../../../../.gradle/caches/transforms-3/9c4b978f8e84c8bb9ebef5f19e8c189e/transformed/qisdk-design-1.7.5/res/layout/activity_robot.xml" value="0.1" />
<entry key="../../../../../../.gradle/caches/transforms-3/9c4b978f8e84c8bb9ebef5f19e8c189e/transformed/qisdk-design-1.7.5/res/layout/view_always_top_speech_bar.xml" value="0.167877197265625" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/drawable/button_background.xml" value="0.128" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/drawable/rectangle.xml" value="0.128" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_bicepvideo.xml" value="0.2015625" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_end_screen.xml" value="0.18" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.2015625" />
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.358695652173913" />
<entry key="..\:/Users/Niels/muupooviixee66-3/code/src/Fitbot/app/src/main/res/drawable/rectangle.xml" value="0.1665" />
<entry key="..\:/Users/Niels/muupooviixee66-3/code/src/Fitbot/app/src/main/res/layout/activity_end_screen.xml" value="0.165" />
<entry key="..\:/Users/Niels/muupooviixee66-3/code/src/Fitbot/app/src/main/res/layout/activity_endscreen.xml" value="0.1" />
<entry key="..\:/Users/Niels/muupooviixee66-3/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml" value="0.1234375" />
<entry key="..\:/Users/Niels/muupooviixee66-3/code/src/Fitbot/app/src/main/res/layout/activity_help.xml" value="0.1" />
<entry key="..\:/Users/Niels/muupooviixee66-3/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.1" />
<entry key="..\:/Users/Niels/muupooviixee66-3/code/src/Fitbot/app/src/main/res/layout/header.xml" value="0.1234375" />
<entry key="..\:/Users/Niels/muupooviixee66-3/code/src/Fitbot/app/src/main/res/layout/toolbar.xml" value="0.1234375" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.25" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/big_red_button_gradient.xml" value="0.2555" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/border_background.xml" value="0.2475" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/border_background_2.xml" value="0.2475" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/border_background_3.xml" value="0.2475" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/border_background_circle.xml" value="0.2475" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/box_background.xml" value="0.2555" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/darkred_button_gradient.xml" value="0.346" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/fitbot_launcher_background.xml" value="0.2475" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/help2_background.xml" value="0.2395" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/help_background.xml" value="0.2395" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/ic_baseline_home_48.xml" value="0.25" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/ic_baseline_settings_48.xml" value="0.25" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/ic_baseline_star_rate_48.xml" value="0.25" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/ic_launcher_background.xml" value="0.25" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/progress_circle.xml" value="0.2475" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/progress_circle_burst.xml" value="0.2475" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/progress_circle_burst_good.xml" value="0.1" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/rectangle.xml" value="0.2395" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/drawable/red_button_gradient.xml" value="0.346" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_bicepvideo.xml" value="0.22826086956521738" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.176" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_end_screen.xml" value="0.4" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml" value="0.4" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_help.xml" value="0.4" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_info_dialog.xml" value="0.264" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.4" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.1" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_power_screen.xml" value="0.1" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_sport_item.xml" value="0.1" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_sport_menu.xml" value="0.1" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/header.xml" value="0.125" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/toolbar.xml" value="0.125" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/dialog_info.xml" value="0.4" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/header.xml" value="0.264" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/toolbar.xml" value="0.264" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/menu/main_menu.xml" value="0.4" />
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/mipmap-anydpi-v26/fitbot_launcher.xml" value="0.2475" />
<entry key="app/src/main/res/layout/activity_end_screen.xml" value="0.1" />
<entry key="app/src/main/res/layout/activity_fitness.xml" value="0.23550724637681159" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.1" />
<entry key="app/src/main/res/layout/activity_sport_item.xml" value="0.2341485507246377" />
@@ -31,6 +65,45 @@
</map>
</option>
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="androidx.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="12">
<item index="0" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="1" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="2" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="3" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.Nullable" />
<item index="4" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
<item index="5" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
<item index="7" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="8" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="9" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="10" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="11" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="11">
<item index="0" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
<item index="1" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="2" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
<item index="5" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="7" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="8" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="9" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="10" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>

View File

@@ -7,7 +7,7 @@ android {
defaultConfig {
applicationId "com.example.fitbot"
minSdk 29
minSdk 23
targetSdk 29
versionCode 1
versionName "1.0"
@@ -34,12 +34,10 @@ dependencies {
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:+'
implementation 'org.joml:joml:1.10.5'
implementation 'com.google.code.gson:gson:2.8.6'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.junit.jupiter:junit-jupiter'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.aldebaran:qisdk:1.7.5'

View File

@@ -7,14 +7,32 @@
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-feature
android:name="android.hardware.bluetooth"
android:required="true" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/fitbot_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@mipmap/fitbot_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Fitbot" >
android:theme="@style/AppTheme">
<activity
android:name=".ui.activities.HelpActivity"
android:exported="false" />
<activity
android:name=".ui.activities.EndScreenActivity"
android:exported="false" />
<activity
android:name=".ui.activities.FitnessActivity"
android:exported="true" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

View File

@@ -1,104 +0,0 @@
package com.example.fitbot.exercise;
import android.util.Log;
import com.example.fitbot.util.path.GesturePath;
import com.example.fitbot.util.server.IWebSocketHandler;
import com.example.fitbot.util.server.WebSocket;
import java.util.Objects;
public abstract class AbstractExercise implements IWebSocketHandler {
private EMuscleGroup muscleGroup;
private GesturePath path;
// Static fields.
private static WebSocket webSocket;
private static AbstractExercise currentExercise = null;
/**
* Constructor for the AbstractExercise class.
*
* @param muscleGroup The muscle group of the exercise.
* @param path The path of the exercise.
*/
public AbstractExercise(EMuscleGroup muscleGroup, GesturePath path) {
this.muscleGroup = muscleGroup;
this.path = path;
}
/**
* Start the exercise.
* This method starts a WebSocket server
*/
public final void startExercise() {
// Ensure no other exercise is active.
if (currentExercise != null && currentExercise != this) {
currentExercise.__stopExercise();
Log.i("Exercises", "Another exercise was started when another was still running.");
}
// If a WebSocket server is already running, change the event handler to be this class.
if (webSocket != null && webSocket.isConnected()) {
webSocket.setEventHandler(this);
}
try {
webSocket = WebSocket.createServer();
Objects.requireNonNull(webSocket, "WebSocket server could not be created.");
webSocket.startListening();
webSocket.setEventHandler(this);
currentExercise = this;
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Method for ending this exercise and returning the grade of the performance
* of this activity.
*/
public final double finishExercise() {
this.__stopExercise();
// TODO: Implement grade calculation
return 0.0;
}
/**
* Stop the exercise.
* This method stops the WebSocket server.
*/
private void __stopExercise() {
if (webSocket != null && webSocket.isConnected()) {
webSocket.stop();
webSocket = null;
}
currentExercise = null;
}
/**
* Check if the current exercise is the current activity.
*/
public final boolean isCurrentActivity() {
return currentExercise == this;
}
/**
* Get the muscle group of the exercise.
*/
public EMuscleGroup getMuscleGroup() {
return muscleGroup;
}
/**
* Get the path of the exercise.
*/
public GesturePath getPath() {
return path;
}
}

View File

@@ -3,21 +3,30 @@ package com.example.fitbot.exercise;
public enum EMuscleGroup {
// TODO: Implement
TORSO(0),
ARMS(1),
LEGS(2),
BALANCE(3);
TORSO(0, new String[]{"upper body", "torso"}),
ARMS(1, new String[]{"arms", "arm", "shoulder"}),
LEGS(2, new String[]{"Lower body", "legs", "leg"});
int muscleGroupIdentifier;
String[] muscleGroupNames;
EMuscleGroup(int identifier) {
EMuscleGroup(int identifier, String[] muscleGroupNames) {
this.muscleGroupIdentifier = identifier;
this.muscleGroupNames = muscleGroupNames;
}
public int getIdentifier() {
return this.muscleGroupIdentifier;
}
public static EMuscleGroup parse(String name) {
for (EMuscleGroup muscleGroup : EMuscleGroup.values())
for (String muscleGroupName : muscleGroup.muscleGroupNames)
if (muscleGroupName.equalsIgnoreCase(name))
return muscleGroup;
return null;
}
public static EMuscleGroup parse(int identifier) {
for (EMuscleGroup muscleGroup : EMuscleGroup.values()) {
if (muscleGroup.getIdentifier() == identifier) {

View File

@@ -0,0 +1,47 @@
package com.example.fitbot.exercise;
import com.example.fitbot.util.path.AnglePath;
public class Exercise {
public final EMuscleGroup muscleGroup;
public final AnglePath leftPath;
public final AnglePath rightPath;
public final String name;
public final String shortDescription;
public final String description;
public final String imageUrl;
public final String videoUrl;
public final float exerciseTimeInSeconds;
/**
* Constructor for the AbstractExercise class.
*
* @param muscleGroup The muscle group of the exercise.
* @param leftPath The path of the left hand.
* @param rightPath The path of the right hand.
* @param name The title of the exercise.
* @param shortDescription The short description of the exercise.
* @param description The full description of the exercise.
* @param imageUrl The URL of the image.
* @param videoUrl The URL of the video.
*/
public Exercise(EMuscleGroup muscleGroup, String name, String shortDescription,
String description, String imageUrl, String videoUrl,
AnglePath leftPath, AnglePath rightPath, float exerciseTimeInSeconds) {
this.name = name;
this.muscleGroup = muscleGroup;
this.shortDescription = shortDescription;
this.description = description;
this.leftPath = leftPath;
this.rightPath = rightPath;
this.imageUrl = imageUrl;
this.videoUrl = videoUrl;
this.exerciseTimeInSeconds = exerciseTimeInSeconds;
}
public interface ExerciseFetchHandler {
void handle(Exercise exercise);
}
}

View File

@@ -0,0 +1,136 @@
package com.example.fitbot.exercise;
import com.example.fitbot.util.path.AnglePath;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
public class ExerciseManager {
private static final String HOST_ADDRESS = "http://145.92.8.132:443";
// The value of these property variables must be equivalent of
// the JSON data that the database sends back.
// If this is not the case then the exercise retrieval will fail.
private static final String PROPERTY_EXERCISE_DURATION = "duration";
private static final String PROPERTY_EXERCISE_ID = "exerciseId";
private static final String PROPERTY_MUSCLE_GROUP = "muscleGroup";
private static final String PROPERTY_IMAGE_URL = "imageUrl";
private static final String PROPERTY_VIDEO_URL = "videoUrl";
private static final String PROPERTY_DESC = "description";
private static final String PROPERTY_SHORT_DESC = "shortDescription";
private static final String PROPERTY_PATH = "path";
private static final String PROPERTY_NAME = "name";
public static final int SENSOR_COUNT = 2;
private static final String[] REQUIRED_PROPERTIES = {
PROPERTY_MUSCLE_GROUP, PROPERTY_DESC,PROPERTY_SHORT_DESC, PROPERTY_IMAGE_URL,
PROPERTY_VIDEO_URL, PROPERTY_NAME, PROPERTY_PATH,
PROPERTY_EXERCISE_DURATION, PROPERTY_EXERCISE_ID
};
public static final int DEFAULT_EXERCISE_REPETITIONS = 10;
public static final float EXERCISE_ERROR_MARGIN = 1.5f;
public static final float EXERCISE_TIME_SCALING_FACTOR = 1.0f;
// Fields representing the statistics of the user
public static int TOTAL_REPETITIONS_REQUIRED = 0;
public static int TOTAL_REPETITIONS_PERFORMED = 0;
public static int TOTAL_EXERCISES_PREFORMED = 0;
/**
* Function for sending an HTTP request to the server.
*
* @param url The URL to send the request to.
* @param method The method to use for the request, e.g. GET or POST.
* @param contentType The content type of the request.
* @param body The body of the request.
* @return The response from the server.
*/
public static String sendHTTP(String url, String method, String contentType, String body) {
try {
URLConnection connection = new URL(url).openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
connection.addRequestProperty("Content-Type", contentType);
connection.addRequestProperty("Request-Method", method);
connection.connect();
// Send a body if it is present
if (body != null)
connection.getOutputStream().write(body.getBytes());
InputStream stream = connection.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
StringBuilder builder = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
builder.append(line);
}
return builder.toString();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
/**
* Function for retrieving an exercise from the Raspberry Pi Database.
*
* @return The exercise, if it exists on the server. Otherwise null.
*/
public static Exercise fetchExerciseFromDatabase() {
String response = sendHTTP(
HOST_ADDRESS, "POST", "application/json", "{}"
);
// Validate the response
if (response != null) {
try {
System.out.println(response);
JsonObject content = JsonParser.parseString(response).getAsJsonObject();
// Ensure all required properties are present
for (String property : REQUIRED_PROPERTIES) {
if (!content.has(property)) {
System.out.println("Missing property: " + property);
return null;
}
}
// 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());
AnglePath[] paths = AnglePath.fromString(content.get(PROPERTY_PATH).getAsString());
if (paths.length != SENSOR_COUNT) {
System.out.println("Invalid path data.");
return null;
}
return new Exercise(
EMuscleGroup.parse(content.get(PROPERTY_MUSCLE_GROUP).getAsString()),
content.get(PROPERTY_NAME).getAsString(),
content.get(PROPERTY_SHORT_DESC).getAsString(),
content.get(PROPERTY_DESC).getAsString(),
content.get(PROPERTY_IMAGE_URL).getAsString(),
content.get(PROPERTY_VIDEO_URL).getAsString(),
paths[0],
paths[1],
content.get(PROPERTY_EXERCISE_DURATION).getAsInt()
);
} catch (Exception e) {
e.printStackTrace();
}
}
return null;
}
}

View File

@@ -1,53 +0,0 @@
package com.example.fitbot.exercise;
/**
* The ExerciseUser class represents a user of the exercise application.
* This contains all necessary information of the current user.
*/
public class ExerciseUser {
public float upperArmLength;
public float lowerArmLength;
public float upperLegLength;
public float lowerLegLength;
public float height;
/**
* Constructor for the ExerciseUser class.
* @param upperArmLength The length of the upper arm.
* @param lowerArmLength The length of the lower arm.
* @param height The height of the user.
* @param upperLegLength The length of the upper leg.
* @param lowerLegLength The length of the lower leg.
*/
public ExerciseUser(float upperArmLength, float lowerArmLength, float height, float upperLegLength, float lowerLegLength) {
this.upperArmLength = upperArmLength;
this.lowerArmLength = lowerArmLength;
this.upperLegLength = upperLegLength;
this.lowerLegLength = lowerLegLength;
this.height = height;
}
/**
* Constructor for the ExerciseUser class.
* @param height The height of the user.
*/
public ExerciseUser(float height) {
this.height = height;
this.upperArmLength = height * 0.2f;
this.lowerArmLength = height * 0.2f;
this.upperLegLength = height * 0.3f;
this.lowerLegLength = height * 0.3f;
}
/**
* Default constructor for the ExerciseUser class.
* This sets the default height to 180.0f. (1.80m)
*/
public ExerciseUser() {
this(180.0f);
}
}

View File

@@ -1,113 +0,0 @@
package com.example.fitbot.exercise;
import com.example.fitbot.util.path.GesturePath;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.joml.Vector3f;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Constructor;
import java.net.URL;
import java.net.URLConnection;
public class FitnessManager {
private static final String HOST_ADDRESS = "http://145.92.8.132";
private static final String PROPERTY_DESC = "description";
private static final String PROPERTY_VECTORS = "vector_data";
private static final String PROPERTY_NAME = "name";
private static final String PROPERTY_MUSCLE_GROUP = "muscle_group";
private static String sendHTTP(String url, String method, String contentType, String body) {
try {
URLConnection connection = new URL(url).openConnection();
connection.addRequestProperty("Content-Type", contentType);
connection.addRequestProperty("Request-Method", method);
connection.getOutputStream().write(body.getBytes());
connection.connect();
InputStream stream = connection.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
StringBuilder builder = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
builder.append(line);
}
return builder.toString();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
/**
* Function for retrieving an exercise from the Raspberry Pi Database.
*
* @param uniqueIdentifier The unique identifier of the exercise
* @return The exercise, if it exists on the server. Otherwise null.
*/
public static <T extends AbstractExercise> AbstractExercise acquireExercise(String uniqueIdentifier, Class<T> referenceClass) {
String response = sendHTTP(
HOST_ADDRESS + "/acquire", "GET", "application/json", "{\"kind\":\"" + uniqueIdentifier + "\"}"
);
// Validate the response
if (response != null) {
try {
JsonObject content = JsonParser.parseString(response).getAsJsonObject();
Constructor<T> constructor = referenceClass.getConstructor(referenceClass);
T instance = null;
try {
instance = constructor.newInstance(
EMuscleGroup.parse(content.get(PROPERTY_MUSCLE_GROUP).getAsInt()),
gesturePathFromString(content.get(PROPERTY_VECTORS).getAsString())
);
} catch (Exception e) {
e.printStackTrace();
}
return instance;
} catch (Exception e) {
e.printStackTrace();
}
}
return null;
}
/**
* Function for converting a string to a GesturePath object.
* The input string bytes will be directly converted into 3d vectors.
* Every coordinate is composed of 32 bits, so four characters per coordinate.
*
* @param input The string to convert
* @return The GesturePath object
*/
private static GesturePath gesturePathFromString(String input) {
byte[] bytes = input.getBytes();
// 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");
}
GesturePath.Builder builder = new GesturePath.Builder();
float[] xyz = new float[3];
for (int i = 0; i < bytes.length; i += 12) {
for (int j = 0; j < 3; j++) {
xyz[j] = Float.intBitsToFloat(
(bytes[i + j * 4] & 0xFF) << 24 |
(bytes[i + j * 4 + 1] & 0xFF) << 16 |
(bytes[i + j * 4 + 2] & 0xFF) << 8 |
(bytes[i + j * 4 + 3] & 0xFF)
);
}
builder.addVector(new Vector3f(
xyz[0], xyz[1], xyz[2]
));
}
return builder.build();
}
}

View File

@@ -0,0 +1,6 @@
package com.example.fitbot.pepper;
public abstract class AbstractPepperActionEvent {
public abstract EPepperAction getAction();
}

View File

@@ -0,0 +1,10 @@
package com.example.fitbot.pepper;
/**
* Enum for Pepper actions
*/
public enum EPepperAction {
ACTION_SPEAK,
ACTION_ANIMATE,
NO_ACTION
}

View File

@@ -0,0 +1,144 @@
package com.example.fitbot.pepper;
import com.aldebaran.qi.sdk.QiContext;
import com.aldebaran.qi.sdk.RobotLifecycleCallbacks;
import com.aldebaran.qi.sdk.object.locale.Language;
import com.aldebaran.qi.sdk.object.locale.Locale;
import com.aldebaran.qi.sdk.object.locale.Region;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* Class representing the Pepper robot.
* All functionality related to Pepper is implemented in this class.
* <p>
* Before any of the functions in this class can be used, the Pepper class needs a QiContext to be
* set. This is retrieved in the `onRobotFocusGained` method of the RobotLifecycleCallbacks
* interface, and can then provided using the `provideContext` method.
* </p>
*/
public class Pepper {
// Queue containing all Pepper actions that need to be executed
// This is to prevent the app from crashing when attempting to perform multiple actions at once
private static final ConcurrentLinkedQueue<AbstractPepperActionEvent> pepperActionEventQueue =
new ConcurrentLinkedQueue<>();
private static final AtomicBoolean isAnimating = new AtomicBoolean(false);
private static final AtomicBoolean isSpeaking = new AtomicBoolean(false);
private static final Locale DEFAULT_LOCALE = new Locale(Language.DUTCH, Region.NETHERLANDS);
/**
* The latest QiContext used by Pepper.
* This can be publicly accessed to get the latest QiContext used by Pepper.
*/
public static QiContext latestContext = null;
/**
* Make the Pepper robot speak a phrase.
* This function adds a SpeechEvent to the event queue,
* and will speak the phrase once Pepper is ready to process it.
*
* @param phrase The phrase to speak
*/
public static void say(String phrase) {
addToEventQueue(new PepperSpeechEvent(phrase, DEFAULT_LOCALE));
}
/**
* Make the Pepper robot perform an animation.
* This function adds an AnimationEvent to the event queue,
* and will perform the animation once Pepper is ready to process it.
*
* @param animationName The name of the animation to play
*/
public static void animate(String animationName) {
addToEventQueue(new PepperAnimationEvent(animationName));
}
/**
* Add an event to the event queue.
* The event will be executed once Pepper is ready to process it.
*
* @param event The event to add to the queue
*/
public static void addToEventQueue(AbstractPepperActionEvent event) {
pepperActionEventQueue.add(event);
processEventQueue();
}
/**
* Process the event queue.
* This method will process the next event in the queue if Pepper is not currently
* speaking or animating.
* This prevents multiple actions from being executed at the same time, which can
* cause the application to crash.
*/
private static synchronized void processEventQueue() {
if (!pepperActionEventQueue.isEmpty()) {
AbstractPepperActionEvent event = pepperActionEventQueue.poll();
// Prevent null pointer exceptions
if (event == null || latestContext == null)
return;
switch (event.getAction()) {
/* Event for speaking a phrase **/
case ACTION_SPEAK:
if (!(event instanceof PepperSpeechEvent) || isSpeaking.get())
break;
PepperSpeechEvent speechEvent = (PepperSpeechEvent) event;
isSpeaking.set(true);
speechEvent
.getSay(latestContext)
.async()
.run()
.andThenConsume(future -> {
isSpeaking.set(false);
processEventQueue();
});
break;
/* Event for animating the robot **/
case ACTION_ANIMATE:
if (!(event instanceof PepperAnimationEvent) || isAnimating.get())
break;
PepperAnimationEvent animationEvent = (PepperAnimationEvent) event;
animationEvent
.getAnimation(latestContext)
.async()
.run()
.andThenConsume(future -> {
isAnimating.set(false);
processEventQueue();
});
break;
default:
// Do nothing
break;
}
}
}
/**
* Function for providing the latest QiContext to Pepper.
*
* @param context The QiContext to use.
* This can be null if the context is not available.
* @param origin The origin of the context.
* This parameter is to prevent other classes from
* unnecessarily providing a context, or setting
* the context to null.
*/
public static void provideContext(QiContext context, Class<? extends RobotLifecycleCallbacks> origin) {
latestContext = context;
if (context != null) {
processEventQueue();
}
}
}

View File

@@ -0,0 +1,65 @@
package com.example.fitbot.pepper;
import com.aldebaran.qi.sdk.QiContext;
import com.aldebaran.qi.sdk.builder.AnimateBuilder;
import com.aldebaran.qi.sdk.builder.AnimationBuilder;
import com.aldebaran.qi.sdk.object.actuation.Animate;
import com.aldebaran.qi.sdk.object.actuation.Animation;
public class PepperAnimationEvent extends AbstractPepperActionEvent {
public final String animationName;
private final IAnimationCompletedListener onLabelReachedListener;
/**
* Constructor for PepperAnimationEvent
*
* @param animationName The name of the animation to play
* @param onLabelReachedListener The listener to call when the animation is completed
*/
public PepperAnimationEvent(String animationName, IAnimationCompletedListener onLabelReachedListener) {
this.animationName = animationName;
this.onLabelReachedListener = onLabelReachedListener;
}
/**
* Constructor for PepperAnimationEvent
*
* @param animationName The name of the animation to play
*/
public PepperAnimationEvent(String animationName) {
this(animationName, null);
}
@Override
public EPepperAction getAction() {
return EPepperAction.ACTION_ANIMATE;
}
/**
* Returns an animation object, which can be used to play the animation
* in the Pepper class.
*/
public Animate getAnimation(QiContext context) {
Animation animation = AnimationBuilder.with(context)
.withResources(context.getResources().getIdentifier(animationName, "raw", context.getPackageName()))
.build();
Animate animate = AnimateBuilder.with(context)
.withAnimation(animation)
.build();
// Add a listener for when a label is reached
animate.addOnLabelReachedListener((label, time) -> {
if (onLabelReachedListener != null && "end".equals(label)) {
onLabelReachedListener.onComplete();
}
});
return animate;
}
public interface IAnimationCompletedListener {
void onComplete();
}
}

View File

@@ -0,0 +1,32 @@
package com.example.fitbot.pepper;
import com.aldebaran.qi.sdk.QiContext;
import com.aldebaran.qi.sdk.builder.SayBuilder;
import com.aldebaran.qi.sdk.object.conversation.Say;
import com.aldebaran.qi.sdk.object.locale.Locale;
public class PepperSpeechEvent extends AbstractPepperActionEvent {
public final String phrase;
public final Locale locale;
public PepperSpeechEvent(String phrase, Locale locale) {
this.locale = locale;
this.phrase = phrase;
}
@Override
public EPepperAction getAction() {
return EPepperAction.ACTION_SPEAK;
}
/**
* Returns a Say object, which can then be executed.
*/
public Say getSay(QiContext context) {
return SayBuilder.with(context)
.withText(this.phrase)
.withLocale(this.locale)
.build();
}
}

View File

@@ -1,43 +0,0 @@
package com.example.fitbot.speech;
import com.aldebaran.qi.sdk.QiContext;
import com.aldebaran.qi.sdk.builder.SayBuilder;
import com.aldebaran.qi.sdk.object.locale.Language;
import com.aldebaran.qi.sdk.object.locale.Locale;
import com.aldebaran.qi.sdk.object.locale.Region;
/**
* SpeechGenerator class for generating speech for the robot
*/
public class SpeechGenerator {
private static final Locale DUTCH_LOCALE = new Locale(Language.DUTCH, Region.NETHERLANDS);
private SayBuilder builder;
/**
* Function for making the robot say something with DUTCH_LOCALE as locale
* @param phrase The phrase to make the robot say
* @param ctx The QiContext to use
*/
public static void say(String phrase, QiContext ctx)
{
say(phrase, ctx, DUTCH_LOCALE);
}
/**
* Function for making the robot say something with a specific locale
* @param phrase The phrase to make the robot say
* @param ctx The QiContext to use
* @param locale The locale to use
*/
public static void say(String phrase, QiContext ctx, Locale locale)
{
SayBuilder
.with(ctx)
.withLocale(locale)
.withText(phrase)
.build()
.run();
}
}

View File

@@ -1,4 +0,0 @@
package com.example.fitbot.ui.activities;
public class CompletionActivity {
}

View File

@@ -0,0 +1,41 @@
package com.example.fitbot.ui.activities;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.aldebaran.qi.sdk.QiContext;
import com.aldebaran.qi.sdk.QiSDK;
import com.aldebaran.qi.sdk.RobotLifecycleCallbacks;
import com.example.fitbot.R;
import com.example.fitbot.pepper.Pepper;
import com.example.fitbot.util.NavigationManager;
public class EndScreenActivity extends AppCompatActivity implements RobotLifecycleCallbacks {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_end_screen);
NavigationManager.hideSystemUI(this);
QiSDK.register(this, this);
NavigationManager.setupButtonNavigation(this, R.id.homeButtonEndScreen, MainActivity.class);
}
@Override
public void onRobotFocusGained(QiContext qiContext) {
Pepper.say("Gefeliciteerd. U heeft de oefening voltooid. Druk op het huisje om terug naar het start scherm te gaan.");
}
@Override
public void onRobotFocusLost() {
}
@Override
public void onRobotFocusRefused(String reason) {
}
}

View File

@@ -1,29 +1,299 @@
package com.example.fitbot.ui.activities;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.VideoView;
import com.aldebaran.qi.sdk.QiContext;
import com.aldebaran.qi.sdk.QiSDK;
import com.aldebaran.qi.sdk.RobotLifecycleCallbacks;
import com.aldebaran.qi.sdk.design.activity.RobotActivity;
import com.aldebaran.qi.sdk.design.activity.conversationstatus.SpeechBarDisplayStrategy;
import com.aldebaran.qi.sdk.object.actuation.Animate;
import com.example.fitbot.R;
import com.example.fitbot.exercise.Exercise;
import com.example.fitbot.exercise.ExerciseManager;
import com.example.fitbot.pepper.Pepper;
import com.example.fitbot.util.NavigationManager;
import com.example.fitbot.util.processing.InputProcessor;
public class FitnessActivity extends RobotActivity implements RobotLifecycleCallbacks {
public static int progress = 1;
// Private fields for the FitnessActivity class.
private InputProcessor motionProcessor;
private Exercise currentExercise;
// Progress circle for the exercises
private ProgressBar progressCircle;
private TextView progressText;
private final int maxProgress = 10;
// Exercise status element data
private TextView exerciseMuscleGroupTextView;
private TextView exerciseNameTextView;
private TextView exerciseShortDescriptionTextView;
//private TextView exerciseDescriptionTextView;
private static String exerciseVideoUrl;
private Animate animate;
private VideoView videoView;
private QiContext qiContext;
private final Object lock = new Object();
// Some nice little messages for the user
private static final String[] EXERCISE_NOT_FOUND_MESSAGES = new String[]{
"Ik heb momenteel helaas wat moeite met het ophalen van oefeningen, sorry.",
"Het lijkt erop dat de oefeningen op een misterieus avontuur zijn. Even wachten tot ze terug zijn.",
", de oefeningen slapen nog, probeer het later nog eens."
};
private static final String EXERCISE_NOT_FOUND_SEEK_HELP_MESSAGE =
"Indien dit probleem zich voortzet, neem contact op met de ontwikkelaar.";
private static final float SENSOR_SAMPLE_RATE = 10.0f;
private static final int EXERCISE_COUNT = 5;
public static int EXERCISE_VIDEO_REPETITION = 1;
private static final float EXERCISE_SPEED_MULTIPLIER = 1.0f;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
QiSDK.register(this, this);
setContentView(R.layout.activity_fitness);
videoView = findViewById(R.id.videoView);
// Fill empty objects with exercise data
this.exerciseNameTextView = findViewById(R.id.textViewFitnessTitle);
this.exerciseShortDescriptionTextView = findViewById(R.id.textViewFitnessShortDescription);
//this.exerciseDescriptionTextView = findViewById(R.id.textViewDialogDescription);
progressCircle = findViewById(R.id.progressCircle);
progressText = findViewById(R.id.progressText);
progressCircle.setMax(maxProgress);
// Set color of loading circle
ProgressBar loadingCircle = findViewById(R.id.loadingCircle);
loadingCircle.setIndeterminateTintList(ColorStateList.valueOf(Color.RED));
// Navigation Buttons
NavigationManager.setupButtonNavigation(this, R.id.homeButtonFitness, MainActivity.class);
NavigationManager.setupButtonNavigation(this, R.id.skipButtonFitness, MainActivity.class); //Needs to skip exercises once those are implemented
// Hide system UI
NavigationManager.hideSystemUI(this);
setSpeechBarDisplayStrategy(SpeechBarDisplayStrategy.IMMERSIVE);
// Initiate info button
Button infoButtonFitness = findViewById(R.id.infoButtonFitness);
infoButtonFitness.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showInfoDialog();
}
});
}
@Override
public void onRobotFocusGained(QiContext qiContext) {
// Implement your logic when the robot focus is gained
// Provide the context so that all queued actions can be performed.
Pepper.provideContext(qiContext, this.getClass());
// Initialize the element whenever it has been added to the screen.
// This will provide the element with the appropriate dimensions for drawing
// the canvas properly.
this.fetchExerciseAsync((exercise) -> {
// Acquire paths from the exercise and provide them to the motion processor
motionProcessor = new InputProcessor(this);
motionProcessor.useExercise(exercise);
}, (n) -> {
int randomMessageIndex = (int) Math.floor(Math.random() * EXERCISE_NOT_FOUND_MESSAGES.length);
Pepper.say(EXERCISE_NOT_FOUND_MESSAGES[randomMessageIndex]);
Pepper.say(EXERCISE_NOT_FOUND_SEEK_HELP_MESSAGE);
// Run on main thread to prevent crashes (wack)
this.runOnUiThread(() -> NavigationManager.navigateToActivity(this, EndScreenActivity.class));
});
}
/**
* Acquire an exercise from the ExerciseManager.
* Whenever the retrieval failed, it will have the robot say something to the user
* to inform them about the issue.
*/
public void fetchExerciseAsync(Exercise.ExerciseFetchHandler onSuccessfulFetch, Exercise.ExerciseFetchHandler onFailedFetch) {
// For some stupid reason we cannot perform network operations on the main thread.
Log.e("fetchvideo", "video fetched");
// therefore we'll have to do it like this...
new Thread(() -> {
Exercise exercise = ExerciseManager.fetchExerciseFromDatabase();
if (exercise == null) {
onFailedFetch.handle(null);
// Main thread stuff
runOnUiThread(() -> NavigationManager.navigateToActivity(this, MainActivity.class));
} else {
onSuccessfulFetch.handle(exercise);
runOnUiThread(() -> {
exerciseNameTextView.setText(exercise.name);
exerciseShortDescriptionTextView.setText(exercise.shortDescription);
// exerciseDescriptionTextView.setText(exercise.description);
exerciseVideoUrl = exercise.videoUrl;
// Play the video
playVideo(videoView, this);
// When the video has started playing remove the loading circle
videoView.setOnInfoListener((mp, what, extra) -> {
if (what == MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START) {
ProgressBar loadingCircle = findViewById(R.id.loadingCircle);
loadingCircle.setVisibility(View.GONE);
//Pepper.animate("armraise");
// Start checking for user movement once the video has loaded
this.motionProcessor.startListening();
this.motionProcessor.startCheckingUserMovement();
return true;
}
return false;
});
videoView.setOnCompletionListener(mp -> {
if (EXERCISE_VIDEO_REPETITION < ExerciseManager.DEFAULT_EXERCISE_REPETITIONS) {
videoView.start(); // start the video again
EXERCISE_VIDEO_REPETITION++;
if (progress >= 10) {
runOnUiThread(() -> NavigationManager.navigateToActivity(this, EndScreenActivity.class));
// InputProcessor.exercisesRemaining = 1;
}
}
});
});
}
}).start();
}
/**
* Function for playing a video in a VideoView
*
* @param videoView The VideoView to play the video in
* @param context The context to use
*/
public void playVideo(VideoView videoView, Context context) {
// Set up the video player
if (videoView != null) {
videoView.setVideoURI(Uri.parse("android.resource://" + context.getPackageName() + "/" + R.raw.arm_raises));
videoView.start();
} else {
Log.e("FitnessActivity", "VideoView is null. Check your layout XML.");
}
}
@Override
public void onRobotFocusLost() {
// Implement your logic when the robot focus is lost
QiSDK.unregister(this, this);
Pepper.provideContext(null, this.getClass()); // Remove the context (unavailable)
// Go to the main screen
// NavigationManager.navigateToActivity(this, MainActivity.class);
}
@Override
public void onRobotFocusRefused(String reason) {
// Implement your logic when the robot focus is refused
}
@Override
protected void onDestroy() {
if (this.motionProcessor != null) {
this.motionProcessor.stopListening();
this.motionProcessor = null;
}
QiSDK.unregister(this, this);
Pepper.provideContext(null, this.getClass());
super.onDestroy();
}
private void showInfoDialog() {
final Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.dialog_info);
// Hide the system UI
NavigationManager.hideSystemUI(this);
// Set the dialog options
dialog.getWindow().setDimAmount(0.5f);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dialog.setCancelable(true);
// Close button for dialog
Button closeButton = dialog.findViewById(R.id.closeButtonDialog);
closeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
dialog.show();
}
public void incrementProgress() {
if (progress++ < maxProgress) {
triggerColorBurst(true);
updateProgress();
}
}
private void updateProgress() {
progressCircle.setProgress(progress);
progressText.setText(progress + "/" + maxProgress);
// run on new thread because if i dont network bs runs on main thread
new Thread(() -> {
Pepper.animate("armraise");
}).start(); }
public void triggerColorBurst(boolean isGoodRep) {
Log.i("InputProcessor", "Color Burst");
try {
int circleId = isGoodRep ? R.drawable.progress_circle_good : R.drawable.progress_circle_bad;
int soundId = isGoodRep ? R.raw.good_sound : R.raw.wrong_sound;
progressCircle.setProgressDrawable(ContextCompat.getDrawable(this, circleId));
// MediaPlayer.create(this, soundId).start();
ObjectAnimator animator = ObjectAnimator.ofFloat(progressCircle, "alpha", 1f, 0f, 1f);
animator.setDuration(700); // Burst duration
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
progressCircle.setProgressDrawable(ContextCompat.getDrawable(FitnessActivity.this, R.drawable.progress_circle));
}
});
animator.start();
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,42 @@
package com.example.fitbot.ui.activities;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.aldebaran.qi.sdk.QiContext;
import com.aldebaran.qi.sdk.QiSDK;
import com.aldebaran.qi.sdk.RobotLifecycleCallbacks;
import com.example.fitbot.R;
import com.example.fitbot.pepper.Pepper;
import com.example.fitbot.util.NavigationManager;
public class HelpActivity extends AppCompatActivity implements RobotLifecycleCallbacks {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_help);
QiSDK.register(this, this);
NavigationManager.setupButtonNavigation(this, R.id.homeButtonHelp, MainActivity.class);
NavigationManager.hideSystemUI(this);
}
@Override
public void onRobotFocusGained(QiContext qiContext) {
Pepper.provideContext(qiContext, this.getClass());
Pepper.say("Welkom bij FitBot. De robot die helpt om fit te blijven. Druk op Start om de oefening te beginnen. Ga terug naar het begin scherm door op het huisje te klikken");
}
@Override
public void onRobotFocusLost() {
}
@Override
public void onRobotFocusRefused(String reason) {
}
}

View File

@@ -1,7 +1,9 @@
package com.example.fitbot.ui.activities;
import static com.example.fitbot.util.Networking.sendIpAddress;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
@@ -9,10 +11,19 @@ import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import com.example.fitbot.R;
import com.example.fitbot.exercise.ExerciseManager;
import com.example.fitbot.pepper.Pepper;
import com.example.fitbot.util.NavigationManager;
import com.example.fitbot.ui.activities.FitnessActivity;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class MainActivity extends AppCompatActivity {
@@ -27,39 +38,83 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Set full screen mode to hide status bar
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
startButton = findViewById(R.id.startButtonMain);
startButton.setOnClickListener(v -> {
Uri videoUri = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.bicepvideo);
Intent intent = new Intent(MainActivity.this, FitnessActivity.class);
intent.putExtra("videoUri", videoUri);
startActivity(intent);
});
// Set up the UI
setUpUi();
// Hide system UI
NavigationManager.hideSystemUI(this);
sendIpAddress(this);
}
private void setUpUi() {
/*---Hooks---*/
drawerLayout = findViewById(R.id.drawer_layout);
navigationView = findViewById(R.id.nav_view);
toolbar = findViewById(R.id.toolbar);
startButton = findViewById(R.id.startButton);
startButton = findViewById(R.id.startButtonMain);
startButton.setOnClickListener(v -> {
// Switch to fitness activity
Log.i("MainActivity", "Switching to FitnessActivity");
Intent intent = new Intent(MainActivity.this, FitnessActivity.class);
startActivity(intent);
});
// Hide the action bar
if (getSupportActionBar() != null) {
getSupportActionBar().hide();
}
NavigationManager.setupButtonNavigation(this, R.id.startButtonMain, FitnessActivity.class);
NavigationManager.setupButtonNavigation(this, R.id.helpButtonMain, HelpActivity.class);
/*---Tool Bar---*/
// setSupportActionBar(toolbar);
setSupportActionBar(toolbar); // Make the toolbar act as the action bar
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayShowTitleEnabled(false); // Remove the title from the toolbar
}
/*---Navigation Drawer Menu---*/
navigationView.bringToFront();
navigationView.bringToFront(); // Make the navigation drawer menu clickable
ActionBarDrawerToggle toggle=new
ActionBarDrawerToggle(this,drawerLayout,toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawerLayout.addDrawerListener(toggle);
toggle.syncState();
ActionBarDrawerToggle toggle = new // Create a toggle for the navigation drawer
ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close) {
@Override
public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
}
@Override
public void onBackPressed(){
public void onDrawerClosed(View drawerView) {
super.onDrawerClosed(drawerView);
}
};
drawerLayout.addDrawerListener(toggle);
toggle.syncState(); // Synchronize the state of the navigation drawer
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
NavigationManager.hideSystemUI(this);
}
}
@Override
public void onBackPressed() { // Close the navigation drawer when the back button is pressed
if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
drawerLayout.closeDrawer(GravityCompat.START);
}
else
{super.onBackPressed();
} else {
super.onBackPressed();
}
}
}

View File

@@ -1,172 +0,0 @@
package com.example.fitbot.ui.components;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.util.Log;
import android.view.View;
import com.example.fitbot.util.path.GesturePath;
import com.example.fitbot.util.path.PathSegment;
import com.example.fitbot.util.processing.MotionData;
import com.example.fitbot.util.processing.MotionProcessor;
import org.joml.Matrix4f;
import org.joml.Vector2f;
import org.joml.Vector3f;
import org.joml.Vector4f;
public class PersonalMotionPreviewElement extends View {
private GesturePath path;
private double pathTime = 0.0D; // The timestamp at which the path is currently at.
private MotionProcessor motionProcessor;
private Path referencePath, performingPath;
private Paint referencePaint, performingPaint;
private Paint backgroundColor = new Paint();
/**
* Constants for the preview path projection.
*/
private final float FOV = 70.0f; // The field of view of the preview path
private final float Z_NEAR = 0.1f; // The near clipping plane
private final float Z_FAR = 1000.0f; // The far clipping plane
private Vector3f cameraPosition = new Vector3f(0.0f, 0.0f, 0.0f); // The position of the camera
private Vector2f screenDimensions = new Vector2f(); // Width and height dimensions of the screen
private Vector2f rotation = new Vector2f(); // Rotation vector (yaw, pitch)
/**
* Constructor for the PersonalMotionPreviewElement class.
*
* @param context The context in which this element is created.
* @param path The gesture path that will be drawn on the canvas.
*/
public PersonalMotionPreviewElement(Context context, GesturePath path) {
super(context);
Log.i("PersonalMotionPreviewElement", "Creating new PersonalMotionPreviewElement.");
this.backgroundColor = new Paint();
this.backgroundColor.setColor(0xFF000000); // Black
this.path = path;
this.motionProcessor = new MotionProcessor();
this.motionProcessor.startListening();
this.motionProcessor.setMotionDataEventHandler((processed, preprocessed, sampleIndex, sampleRate) -> {
// TODO: Implement the calculation of the `performingPath` based on the motion data
});
this.referencePath = getDrawablePath(path.getSegments());
this.performingPath = new Path();
this.referencePaint = new Paint();
this.referencePaint.setColor(-1); // White
this.referencePaint.setStyle(Paint.Style.STROKE);
this.referencePaint.setStrokeWidth(5.0f);
this.performingPaint = new Paint();
this.performingPaint.setColor(0xFF0000FF); // Blue
this.performingPaint.setStyle(Paint.Style.STROKE);
this.performingPaint.setStrokeWidth(5.0f);
}
/**
* Method that calculates the path that will be drawn on the
* canvas. This method will be called every time new motion data is received.
*/
private void calculateDrawingPath(Vector3f transformedVector, MotionData motionData, int sampleIndex, double sampleRate) {
// Recalculate the personal path based on the new motion data
}
/**
* Method for setting the gesture path that will be drawn on the canvas.
*
* @param path The gesture path to draw.
*/
public void setGesturePath(GesturePath path) {
this.path = path;
this.referencePath = getDrawablePath(path.getSegments());
}
/**
* Method for setting the rotation of the preview path.
*
* @param yaw The yaw rotation of the preview path.
* @param pitch The pitch rotation of the preview path.
*/
public void setRotation(float yaw, float pitch) {
this.rotation.set(Math.toRadians(yaw), Math.toRadians(pitch));
}
/**
* Method for projecting a 3D point onto the screen.
* This method converts the 3D point to 2D space using a Model-View-Projection matrix transformation.
*
* @param point The point to cast to the screen.
* @param virtualWidth The width of the virtual screen.
* This is used to normalize the screen coordinates.
* @param virtualHeight The height of the virtual screen.
* @return The transformed vector in screen coordinates ranging from (0, 0) to (virtualWidth, virtualHeight).
*/
private Vector2f projectVertex(Vector3f point, int virtualWidth, int virtualHeight) {
Matrix4f modelViewMatrix = new Matrix4f()
.rotateX((float) Math.toRadians(rotation.x))
.rotateY((float) Math.toRadians(rotation.y))
.translate(cameraPosition);
Matrix4f projectionMatrix = new Matrix4f()
.perspective((float) Math.toRadians(FOV), (float) virtualWidth / virtualHeight, Z_NEAR, Z_FAR);
// Calculate Model-View-Projection matrix
Matrix4f MVP = new Matrix4f()
.set(projectionMatrix)
.mul(modelViewMatrix);
// Convert to screen coordinates
Vector4f screenCoordinates = new Vector4f(point, 1.0f)
.mul(MVP);
// Normalize screen coordinates from (-1, 1) to (0, virtualWidth) and (0, virtualHeight)
float normalizedX = (screenCoordinates.x / screenCoordinates.w + 1.0f) * 0.5f * virtualWidth;
float normalizedY = (1.0f - screenCoordinates.y / screenCoordinates.w) * 0.5f * virtualHeight;
return new Vector2f(normalizedX, normalizedY);
}
/**
* Method that converts a sequence of vectors to a Path object.
* This path is a set of bezier curves that will be drawn on the canvas.
*
* @param segments The path segments in the path.
* These segments will be connected by bezier curves, which
* all have unique curvature values.
* @return The generated path object.
*/
private Path getDrawablePath(PathSegment... segments) {
Path calculatedPath = new Path();
// Starting point
Vector2f origin = projectVertex(segments[0].getStart(), getWidth(), getHeight());
calculatedPath.moveTo(origin.x, origin.y);
// Draw the path segments
for (PathSegment segment : segments) {
Vector2f startProjected = projectVertex(segment.getStart(), getWidth()/2, getHeight());
Vector2f endProjected = projectVertex(segment.getEnd(), getWidth()/2, getHeight());
calculatedPath.lineTo(startProjected.x, startProjected.y);
calculatedPath.lineTo(endProjected.x, endProjected.y);
}
return calculatedPath;
}
@Override
public void onDraw(Canvas canvas) {
canvas.drawRect(0, 0, getWidth(), getHeight(), backgroundColor);
// Draw the sport preview canvas
canvas.drawPath(referencePath, referencePaint);
canvas.drawPath(performingPath, performingPaint);
}
}

View File

@@ -1,6 +1,7 @@
package com.example.fitbot;
//usage: PlayAnimation(animationfile, Qicontext);
// https://qisdk.softbankrobotics.com/sdk/doc/pepper-sdk/ch4_api/movement/reference/animation.html
import android.support.v7.app.AppCompatActivity;
package com.example.fitbot.util;
import com.aldebaran.qi.sdk.QiContext;
import com.aldebaran.qi.sdk.builder.AnimateBuilder;
@@ -8,16 +9,9 @@ import com.aldebaran.qi.sdk.builder.AnimationBuilder;
import com.aldebaran.qi.sdk.object.actuation.Animate;
import com.aldebaran.qi.sdk.object.actuation.Animation;
public class Animations extends AppCompatActivity {
public class Animations {
public static void Animate(String AnimationFile, QiContext ctx)
{
PlayAnimation(AnimationFile, ctx);
}
public static void PlayAnimation(String AnimationFile, QiContext ctx)
{
public static void Animate(String AnimationFile, QiContext ctx) {
int resId = ctx.getResources().getIdentifier(AnimationFile, "raw", ctx.getPackageName());
Animation animation = AnimationBuilder.with(ctx)
@@ -30,5 +24,4 @@ public class Animations extends AppCompatActivity {
animate.async().run();
}
}

View File

@@ -0,0 +1,60 @@
package com.example.fitbot.util;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
public class NavigationManager {
/**
* Sets up a button to navigate to a different activity when clicked.
*
* @param currentActivity The activity that contains the button
* @param buttonId The ID of the button
* @param targetActivity The activity to navigate to
*/
public static void setupButtonNavigation(Activity currentActivity, int buttonId, Class<? extends Activity> targetActivity) {
Button button = currentActivity.findViewById(buttonId);
if (button == null) {
throw new IllegalArgumentException("Button with ID " + buttonId + " not found in " + currentActivity.getClass().getSimpleName());
}
button.setOnClickListener(v -> NavigationManager.navigateToActivity(currentActivity, targetActivity));
}
/**
* Navigates to the target activity.
*
* @param currentActivity The current activity
* @param targetActivity The target activity
*/
public static void navigateToActivity(Activity currentActivity, Class<? extends Activity> targetActivity) {
Intent intent = new Intent(currentActivity, targetActivity);
// Close previous activity
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
currentActivity.startActivity(intent);
currentActivity.finish();
}
/**
* Navigates to the target activity.
*
* @param context The context
* @param targetActivity The target activity
*/
public static void navigateToActivity(Context context, Class<? extends Activity> targetActivity) {
Intent intent = new Intent(context, targetActivity);
context.startActivity(intent);
}
public static void hideSystemUI(Activity currentActivity) {
View decorView = currentActivity.getWindow().getDecorView();
// Hide the status bar and navigation bar
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
decorView.setSystemUiVisibility(uiOptions);
}
}

View File

@@ -0,0 +1,76 @@
package com.example.fitbot.util;
import android.content.Context;
import android.net.wifi.WifiManager;
import android.os.AsyncTask;
import android.util.Log;
import java.io.OutputStream;
import java.math.BigInteger;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.URL;
import java.net.UnknownHostException;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
public class Networking {
public static void sendIpAddress(final Context context) {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
String ipAddress = getIPAddress(context);
String jsonInputString = "{\"ip\":\"" +
ipAddress +
"\"}";
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
HttpURLConnection conn = null;
try {
URL url = new URL("http://145.92.8.132:443/set-ip"); // Replace with your Node server URL
conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.setDoOutput(true);
OutputStream os = conn.getOutputStream();
os.write(input, 0, input.length);
os.close();
int responseCode = conn.getResponseCode();
Log.i("NetworkUtils", "Response Code: " + responseCode);
} catch (Exception e) {
Log.e("NetworkUtils", "Error sending IP address", e);
} finally {
if (conn != null) {
conn.disconnect();
}
}
return null;
}
}.execute();
}
private static String getIPAddress(Context context) {
WifiManager wifiManager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
int ipAddress = wifiManager.getConnectionInfo().getIpAddress();
// Convert little-endian to big-endian if needed
if (ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN)) {
ipAddress = Integer.reverseBytes(ipAddress);
}
byte[] ipByteArray = BigInteger.valueOf(ipAddress).toByteArray();
String ip = "";
try {
ip = InetAddress.getByAddress(ipByteArray).getHostAddress();
} catch (UnknownHostException ex) {
Log.e("WIFIIP", "Unable to get host address.");
}
return ip;
}
}

View File

@@ -0,0 +1,69 @@
package com.example.fitbot.util.path;
import com.example.fitbot.exercise.ExerciseManager;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.joml.Vector3f;
public class AnglePath {
// The angles
private final Vector3f[] angles;
/**
* Create a new gesture path with a given set of vectors and curvature.
*
* @param angles The vectors that make up the path.
*/
public AnglePath(Vector3f[] angles) {
this.angles = angles;
}
/**
* Method for retrieving the vectors of the GesturePath.
*/
public Vector3f[] getAngleVectors() {
return this.angles;
}
/**
* Function for converting a string to a GesturePath object.
* This function has been updated to convert Json strings to AnglePath objects.
* The JSON must be in the following format:
* [
* { "deviceId": number, "data": [ [x, y, z], [x, y, z], ... ] },
* ]
*
* @param jsonInput The string to convert
* @return The AnglePath object
*/
public static AnglePath[] fromString(String jsonInput) {
if (jsonInput == null)
throw new IllegalArgumentException("Input string cannot be null");
JsonElement parsed = JsonParser.parseString(jsonInput);
if (!parsed.isJsonArray())
throw new IllegalArgumentException("Input string must be a JSON array");
if ( parsed.getAsJsonArray().size() != ExerciseManager.SENSOR_COUNT)
throw new IllegalArgumentException("Input string must contain 2 elements");
Vector3f[][] angles = new Vector3f[ExerciseManager.SENSOR_COUNT][];
for ( int dataArrayIdx = 0; dataArrayIdx < parsed.getAsJsonArray().size(); dataArrayIdx++)
{
JsonArray array = parsed.getAsJsonArray().get(dataArrayIdx).getAsJsonObject().get("data").getAsJsonArray();
int deviceIdx = parsed.getAsJsonArray().get(dataArrayIdx).getAsJsonObject().get("deviceId").getAsInt();
angles[deviceIdx] = new Vector3f[array.size()];
for (int i = 0; i < array.size(); i++) {
JsonArray vec = array.get(i).getAsJsonArray();
angles[deviceIdx][i] = new Vector3f(vec.get(0).getAsFloat(), vec.get(1).getAsFloat(), vec.get(2).getAsFloat());
}
}
return new AnglePath[] {new AnglePath(angles[0]), new AnglePath(angles[1])};
}
}

View File

@@ -1,121 +0,0 @@
package com.example.fitbot.util.path;
import org.joml.Vector3f;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class GesturePath {
// The vectors that make up the path.
private final PathSegment[] segments;
public GesturePath(Vector3f[] vectors) {
this(vectors, 0.0D);
}
/**
* Create a new gesture path with a given set of vectors and curvature.
*
* @param vectors The vectors that make up the path.
* @param curvature The curvature of the path.
*/
public GesturePath(Vector3f[] vectors, double curvature)
{
if ( vectors.length < 2)
throw new IllegalArgumentException("A path must have at least two points.");
this.segments = new PathSegment[vectors.length - 1];
for ( int i = 0; i < vectors.length - 1; i++)
segments[i] = new PathSegment(vectors[i], vectors[i + 1]);
}
/**
* Constructor for a GesturePath with provided PathSegments.
* @param segments The PathSegments to initialize the path with.
*/
public GesturePath(PathSegment... segments) {
this.segments = segments;
}
/**
* Getter method for retrieving the path segments of this GesturePath.
*
* @return The path segments.
*/
public PathSegment[] getSegments() {
return segments;
}
/**
* Method for retrieving the closest path segment to a reference point.
*
* @param reference The reference point to find the closest path segment to.
* @return The closest path segment to the reference point.
*/
public PathSegment closest(Vector3f reference) {
// If there's only one segment, return that one.
if ( segments.length == 1)
return segments[0];
return Arrays
.stream(segments)
.reduce(segments[0], (a, b) -> PathSegment.closer(a, b, reference));
}
/**
* Get the error between an arbitrary path segment and the reference point.
*
* @param referencePoint The reference point to calculate the error of.
* @return The error offset between the path and the reference point.
*/
public double getError(Vector3f referencePoint) {
return closest(referencePoint).difference(referencePoint); // Get the closest segment and calculate the error.
}
// Builder class for the GesturePath object.
public static class Builder {
// List of vectors to add to the GesturePath object.
private final List<Vector3f> vectors;
/**
* Constructor for the Builder object.
*
* @param vectors The list of vectors to add.
*/
public Builder(List<Vector3f> vectors) {
this.vectors = vectors;
}
/**
* Default constructor for the Builder object.
*/
public Builder() {
this.vectors = new ArrayList<>();
}
/**
* Adds a vector to the GesturePath object.
*
* @param vector The vector to add.
* @return The Builder object.
*/
public Builder addVector(Vector3f vector) {
vectors.add(vector);
return this;
}
/**
* Builds the GesturePath object.
*
* @return The GesturePath object.
*/
public GesturePath build() {
return new GesturePath(vectors.toArray(new Vector3f[0]));
}
}
}

View File

@@ -0,0 +1,15 @@
package com.example.fitbot.util.processing;
import org.joml.Vector3f;
public interface IInputHandler {
/**
* Function for accepting motion data and the transformed vector.
*
* @param rotationVector The rotation vector of the motion data.
* @param sensorId The sensor ID of the motion data.
*/
void accept(Vector3f rotationVector, int sensorId);
}

View File

@@ -1,16 +0,0 @@
package com.example.fitbot.util.processing;
import org.joml.Vector3f;
public interface IMotionDataConsumer {
/**
* Function for accepting motion data and the transformed vector.
* @param transformedVector The transformed vector.
* @param motionData The input motion data.
* @param sampleIndex The index of the current sample
* @param sampleRate The sample rate.
*/
void accept(Vector3f transformedVector, MotionData motionData, int sampleIndex, double sampleRate);
}

View File

@@ -0,0 +1,460 @@
package com.example.fitbot.util.processing;
import android.app.ActivityManager;
import android.util.Log;
import com.example.fitbot.exercise.Exercise;
import com.example.fitbot.exercise.ExerciseManager;
import com.example.fitbot.pepper.Pepper;
import com.example.fitbot.ui.activities.EndScreenActivity;
import com.example.fitbot.ui.activities.FitnessActivity;
import com.example.fitbot.ui.activities.MainActivity;
import com.example.fitbot.util.NavigationManager;
import com.example.fitbot.util.server.WebServer;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.jetbrains.annotations.NotNull;
import org.joml.Vector3f;
import org.json.JSONArray;
import java.util.ArrayList;
import java.util.List;
public class InputProcessor {
private List<Vector3f>[] selfRotationVectorPaths = new ArrayList[2];
// Relative path of the motion data
private Vector3f[][] targetRotationVectorPaths; // Target path of the motion data
private float exerciseRepetitionDurationInSeconds = 0.0f;
public static int exercisesRemaining = 1;
private float errorCheckInterval_s;
private int checksPerformed = 0;
private int totalChecks = 0;
private final FitnessActivity parentActivity;
/**
* The phrases that are said by the robot whenever the exercise starts.
*/
private static final String[] STARTING_PHRASES = {
"Veel success met de oefening!",
"Je kan het!",
"Veel plezier!"
};
/**
* This field is used to determine if the motion data is being recorded.
* If this is the case, instead of functioning normally, the element
* will record the movement that the user makes, store it in the
* `selfRotationVectorPaths` field and send it to the server.
*/
private boolean recordingMovement = false;
/**
* Represents the duration of the recording in seconds.
* This field only has effect when the `recordingMovement` field is set to true.
*/
private float recordingDurationInSeconds = 0.0f;
// How many seconds have passed since the start of the exercise.
// The exercise starts whenever the `startListening` function is called.
private double secondsPassed = 0.0D;
private long lastTime;
private static final String[] REQUIRED_SENSOR_JSON_PROPERTIES =
{"rotationX", "rotationY", "rotationZ", "deviceId"};
// The web server that listens for incoming motion data.
private WebServer server;
/**
* Constructor for the motion processor.
*/
public InputProcessor(FitnessActivity parentActivity) {
this.selfRotationVectorPaths[0] = new ArrayList<>();
this.selfRotationVectorPaths[1] = new ArrayList<>();
this.parentActivity = parentActivity;
ExerciseManager.TOTAL_REPETITIONS_PERFORMED = 0;
// Initialize each ArrayList in the array
}
/**
* Function for setting the exercise to use.
* This updates the user and target path and the
* duration of the exercise.
* <p>
* This function is only initially used to select the starting exercise;
* the exercises that follow are determined by a private method 'nextExercise'
*
* @param exercise The exercise to use the paths for.
*/
public void useExercise(Exercise exercise) {
if (this.recordingMovement)
throw new IllegalStateException("Cannot change exercise while recording movement.");
exercisesRemaining = 1;
this.nextExercise(exercise);
Pepper.say(STARTING_PHRASES[(int) Math.floor(Math.random() * STARTING_PHRASES.length)]);
}
/**
* Function that starts checking for user movement.
* This function will start a thread that will check for user movement
* and compare the last rotation vectors to the target rotation vectors.
*/
public void startCheckingUserMovement() {
// Error checking thread.
(new Thread(() -> {
Log.i("InputProcessor", "Movement Checking Thread started");
while (exercisesRemaining > 0) {
if (this.totalChecks == 0 || this.selfRotationVectorPaths == null
|| this.selfRotationVectorPaths.length == 0
|| this.selfRotationVectorPaths[0] == null
|| this.selfRotationVectorPaths[1] == null
|| this.selfRotationVectorPaths[0].size() == 0
|| this.selfRotationVectorPaths[1].size() == 0)
continue;
boolean isFaulty = this.isFaultyMovement();
Log.i("InputProcessor", "Movement checked: " + (isFaulty ? "Faulty" : "Good"));
if (isFaulty) {
this.onInadequateRepetition();
} else this.onAdequateRepetition();
this.checksPerformed++;
if (this.checksPerformed >= this.totalChecks) {
this.checksPerformed = 0;
this.exercisesRemaining--;
acquireExercise();
}
try {
Thread.sleep((long) (this.errorCheckInterval_s * 1000));
} catch (InterruptedException e) {
e.printStackTrace();
}
}
})).start();
}
/**
* Moves on to the next exercise without changing the remaining exercises.
*
* @param exercise The exercise to move on to.
*/
private void nextExercise(Exercise exercise) {
//TODO: Remove when more than one exercise
if (this.exercisesRemaining <= 0) {
Log.i("InputProcessor", "Moving to end screen; finished all exercises");
// Move to end screen on main activity
this.parentActivity.runOnUiThread(() -> NavigationManager.navigateToActivity(this.parentActivity, EndScreenActivity.class));
// ExerciseManager.TOTAL_REPETITIONS_PERFORMED = 0;
return;
}
Log.i("InputProcessor", "Acquired next exercise: " + exercise.name);
ExerciseManager.TOTAL_REPETITIONS_REQUIRED += ExerciseManager.DEFAULT_EXERCISE_REPETITIONS;
ExerciseManager.TOTAL_EXERCISES_PREFORMED++;
this.checksPerformed = 0;
this.totalChecks = ExerciseManager.DEFAULT_EXERCISE_REPETITIONS * 6;
this.selfRotationVectorPaths = new ArrayList[2];
this.selfRotationVectorPaths[0] = new ArrayList<>();
this.selfRotationVectorPaths[1] = new ArrayList<>();
this.targetRotationVectorPaths = new Vector3f[2][exercise.rightPath.getAngleVectors().length];
this.targetRotationVectorPaths[0] = exercise.leftPath.getAngleVectors();
this.targetRotationVectorPaths[1] = exercise.rightPath.getAngleVectors();
this.exerciseRepetitionDurationInSeconds = exercise.exerciseTimeInSeconds;
this.secondsPassed = 0.0D;
this.lastTime = System.currentTimeMillis();
Log.i("InputProcessor", "Repetition time: " + exercise.exerciseTimeInSeconds);
this.exerciseRepetitionDurationInSeconds = Math.max(this.exerciseRepetitionDurationInSeconds, 2);
this.errorCheckInterval_s = exercise.exerciseTimeInSeconds / 3.0f;
Log.i("InputProcessor", "Exercise error checking interval: " + this.errorCheckInterval_s);
}
/**
* Method that is called whenever the user performs a good repetition.
*/
public void onAdequateRepetition() {
ExerciseManager.TOTAL_REPETITIONS_PERFORMED++;
Log.i("InputProcessor", "Adequate repetition performed");
this.parentActivity.runOnUiThread(this.parentActivity::incrementProgress);
}
/**
* Method that is called whenever the user performs a bad repetition.
*/
public void onInadequateRepetition() {
Log.i("InputProcessor", "Inadequate repetition performed");
this.parentActivity.runOnUiThread(() -> this.parentActivity.triggerColorBurst(false));
}
/**
* Function for setting whether the motion data
* should be recorded or not.
*
* @param recording Whether the motion data should be recorded.
* @param duration For how long the motion data should be recorded.
* This only has an effect if `recording` is true.
*/
public void setRecording(boolean recording, float duration) {
this.recordingMovement = recording;
this.recordingDurationInSeconds = duration;
if (recording) {
this.secondsPassed = 0.0D;
this.lastTime = System.currentTimeMillis();
this.selfRotationVectorPaths[0] = new ArrayList<>();
this.selfRotationVectorPaths[1] = new ArrayList<>();
}
}
/**
* Function for checking if the exercise or recording has finished.
* This function will return true if the execution of the exercise has finished or
* if the recording has finished, depending on the state of the `recordingMovement` field.
*
* @return Whether the exercise or recording has finished.
*/
public boolean hasFinished() {
return this.recordingMovement ?
(this.secondsPassed >= this.recordingDurationInSeconds) :
(this.secondsPassed >= this.exerciseRepetitionDurationInSeconds);
}
/**
* Function for starting the listening process
* of the motion sensor. This function will create
* a new WebSocket server and start listening for
* incoming connections.
*/
public void startListening() {
this.selfRotationVectorPaths = new ArrayList[]{new ArrayList(), new ArrayList()};
// Create socket server
this.server = WebServer.createServer();
//
// FitnessActivity.progress = 1;
Log.i("MotionProcessor", "Listening for incoming connections.");
// Check if the socket
if (server != null) {
// Update event handler to match our functionality.
server.setEventHandler(this::parsePacket);
this.secondsPassed = 0.0d;
this.lastTime = System.currentTimeMillis();
}
}
/**
* Function for acquiring the next exercise from the database.
* Upon successful retrieval, it will call the nextExercise method.
*/
private void acquireExercise() {
if (this.exercisesRemaining <= 0) {
Log.i("InputProcessor", "Exercises finished");
this.parentActivity.runOnUiThread(() -> {
NavigationManager.navigateToActivity(this.parentActivity, EndScreenActivity.class);
});
return;
}
Log.i("MotionProcessor", "Fetching exercise data.");
this.parentActivity.fetchExerciseAsync(this::nextExercise, (nil) -> {
Log.i("MotionProcessor", "Failed to fetch exercise data.");
});
}
/**
* Function for stopping the listening process
* of the motion sensor. This function will stop
* the WebSocket server.
*/
public void stopListening() {
if (server != null) {
server.stop();
server = null;
}
}
/**
* Function for parsing arbitrary packet data.
*
* @param data The data to parse.
*/
public void parsePacket(@NotNull String data) {
try {
Log.i("MotionProcessor", "Time passed: " + this.secondsPassed + "s");
if (this.recordingMovement)
Log.i("MotionProcessor", this.secondsPassed + " / " + this.recordingDurationInSeconds);
Log.i("MotionProcessor", "Received packet data: " + data);
JsonElement json = JsonParser.parseString(data);
if (!json.isJsonObject())
return;
JsonObject object = json.getAsJsonObject();
// Ensure all properties are present in the received JSON object
for (String s : REQUIRED_SENSOR_JSON_PROPERTIES) {
if (!object.has(s))
return;
}
// Parse the data
Vector3f rotation = new Vector3f(
object.get("rotationX").getAsFloat(),
object.get("rotationY").getAsFloat(),
object.get("rotationZ").getAsFloat());
int deviceId = object.get("deviceId").getAsInt();
// Parse the retrieved data
parseRotationVector(rotation, deviceId);
} catch (Exception e) {
Log.i("MotionProcessor", "Failed to parse packet data.");
}
}
/**
* Function for adding motion data to the processor.
*
* @param rotation The rotation vector of the motion data.
* @param deviceId The device ID of the motion data.
*/
public void parseRotationVector(Vector3f rotation, int deviceId) {
if (deviceId >= 0 && deviceId < selfRotationVectorPaths.length) {
// Re-calculate time for index calculation
secondsPassed = (System.currentTimeMillis() - lastTime) / 1000.0d;
// Supposed index of the current rotation vector in the `rotationVectorPaths` array
this.selfRotationVectorPaths[deviceId].add(rotation);
if (this.recordingMovement && this.secondsPassed >= this.recordingDurationInSeconds) {
// Do something with the recorded data.
this.recordingMovement = false;
// Convert recorded data from `selfRotationVectorPaths` to string, and
// publish to database, or do something else with it.
String converted = convertRecordedDataToString();
//split string into 4 to print it fully in console
final int quarter = converted.length() / 4;
String[] parts = {
converted.substring(0, quarter),
converted.substring(quarter, 2 * quarter),
converted.substring(2 * quarter, 3 * quarter),
converted.substring(3 * quarter)
};
Log.i("MotionProcessor", "Converted data: ");
Log.i("ProcessedData", parts[0]);
Log.i("ProcessedData", parts[1]);
Log.i("ProcessedData", parts[2]);
Log.i("ProcessedData", parts[3]);
}
// Do something else with the vector
Log.i("MotionProcessor", "Rotation vector: " + rotation.toString() + " from device: " + deviceId);
// Whenever the exercise has finished and it's not recording,
// attempt to move to the next exercise.
// If this fails, navigate back to the main activity.
if (this.hasFinished() && !this.recordingMovement)
acquireExercise();
}
}
/**
* Function for converting the recorded data to a string.
* This function will convert the recorded data to a string
* that can be sent to a database or other storage.
*
* @return The converted string.
*/
private String convertRecordedDataToString() {
int[] intBits = new int[3];
char[] vectorChars = new char[12]; // 4 bytes per scalar, 12 chars per vector
JsonArray jsonArray = new JsonArray();
/*
* Convert to JSON array in the following format:
* [ { "deviceId": number, "data": [ [x, y, z], [x, y, z], ... ] }]
*/
// Iterate over all devices. In the current instance, it's 2.
for (int deviceId = 0; deviceId < selfRotationVectorPaths.length; deviceId++) {
JsonObject jsonDeviceObject = new JsonObject();
jsonDeviceObject.addProperty("deviceId", deviceId);
// Data array
JsonArray jsonDeviceDataArray = new JsonArray();
for (Vector3f vector : selfRotationVectorPaths[deviceId]) {
JsonArray jsonScalarArray = new JsonArray();
jsonScalarArray.add(vector.x);
jsonScalarArray.add(vector.y);
jsonScalarArray.add(vector.z);
jsonDeviceDataArray.add(jsonScalarArray);
}
jsonDeviceObject.add("data", jsonDeviceDataArray);
jsonArray.add(jsonDeviceObject);
}
return jsonArray.toString();
}
/**
* Function for checking whether the last movement was faulty
*/
public boolean isFaultyMovement() {
boolean upMovementDetected = false;
boolean downMovementDetected = false;
for (List<Vector3f> path : selfRotationVectorPaths) {
if (path.size() < 2) {
continue; // Skip if there are not enough points to compare
}
Vector3f firstPoint = path.get(0);
Vector3f lastPoint = path.get(path.size() - 1);
float y1 = firstPoint.y;
float y2 = lastPoint.y;
if (y2 > y1) {
upMovementDetected = true;
} else if (y2 < y1) {
downMovementDetected = true;
}
if (upMovementDetected && downMovementDetected) {
return false; // Return false for faulty movement if both up and down movements are detected
}
}
return true; // Return true for faulty movement if only up or down movement is detected
}
}

View File

@@ -1,65 +0,0 @@
package com.example.fitbot.util.processing;
import org.joml.Vector3f;
import java.util.Objects;
public class MotionData {
// Data of the motion sensor
public Vector3f acceleration, rotation;
// Delimiter for the data received from the motion sensor
private static final String DATA_DELIMITER = ";";
/**
* Constructor for the MotionData class.
*
* @param accelerationX The acceleration in the X axis in m/s^2.
* @param accelerationY The acceleration in the Y axis in m/s^2.
* @param accelerationZ The acceleration in the Z axis in m/s^2.
* @param rotationX The rotation in the X axis in degrees.
* @param rotationY The rotation in the Y axis in degrees.
* @param rotationZ The rotation in the Z axis in degrees.
*/
public MotionData(float accelerationX, float accelerationY, float accelerationZ, float rotationX, float rotationY, float rotationZ) {
this.acceleration = new Vector3f(accelerationX, accelerationY, accelerationZ);
this.rotation = new Vector3f(rotationX, rotationY, rotationZ);
}
/**
* Constructor for the MotionData class.
*
* @param acceleration The acceleration vector in m/s^2.
* @param rotation The rotation vector in degrees.
*/
public MotionData(Vector3f acceleration, Vector3f rotation) {
this.acceleration = acceleration;
this.rotation = rotation;
}
/**
* Function for decoding a string into a MotionData object.
* This string must contain the data of the motion sensor
* separated by the delimiter. (;)
*
* @param data The string containing the data of the motion sensor.
* @return An instance of MotionData.
*/
public static MotionData decode(String data) {
Objects.requireNonNull(data); // Ensure data is not null
String[] parts = data.split(DATA_DELIMITER);
if (parts.length != 6)
return null;
return new MotionData(
Float.parseFloat(parts[0]),
Float.parseFloat(parts[1]),
Float.parseFloat(parts[2]),
Float.parseFloat(parts[3]),
Float.parseFloat(parts[4]),
Float.parseFloat(parts[5])
);
}
}

View File

@@ -1,249 +0,0 @@
package com.example.fitbot.util.processing;
import android.util.Log;
import com.example.fitbot.util.path.GesturePath;
import com.example.fitbot.util.server.IWebSocketHandler;
import com.example.fitbot.util.server.WebSocket;
import org.jetbrains.annotations.NotNull;
import org.joml.Vector3f;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class MotionProcessor {
public static final String DELIMITER = ";";
private final List<MotionData> preprocessedData = new ArrayList<>(); // Preprocessed motion data
private final List<Vector3f> relativePath = new ArrayList<>(); // Relative path of the motion data
private Vector3f ZERO = new Vector3f(0, 0, 0);
private float sampleRate = 1.0F; // samples/second
private IMotionDataConsumer motionDataConsumer = (p1, p2, p3, p4) -> {};
private GesturePath path;
private WebSocket socket;
public MotionProcessor() {}
/**
* Function for starting the listening process
* of the motion sensor. This function will create
* a new WebSocket server and start listening for
* incoming connections.
*/
public void startListening() {
// Create socket server
this.socket = WebSocket.createServer();
Log.i("MotionProcessor", "Listening for incoming connections.");
// Check if the socket
if (socket != null) {
// Update event handler to match our functionality.
socket.setEventHandler(new IWebSocketHandler() {
@Override
public void onMessageReceived(WebSocket.Message message, WebSocket.MessageReply replier) {
parsePacket(message.message);
}
});
socket.startListening();
}
}
/**
* Function for stopping the listening process
* of the motion sensor. This function will stop
* the WebSocket server.
*/
public void stopListening() {
if (socket != null) {
socket.stop();
}
}
/**
* Function for parsing arbitrary packet data.
* @param data The data to parse.
*/
public void parsePacket(@NotNull String data) {
// If the message starts with 'data', it's a data packet.
if ( data.startsWith("data")) {
Log.i("MotionProcessor", "Received data packet: " + data.split(" ")[1]);
MotionData parsedData = MotionData.decode(data.split(" ")[1]);
if (parsedData != null) {
addMotionData(parsedData);
}
// Otherwise check if it starts with 'calibrate', this is the ZERO point.
} else if ( data.startsWith("zero")) { // message to calibrate device
String[] vectorData = data.split(" ")[1].split(DELIMITER);
ZERO = new Vector3f(
Float.parseFloat(vectorData[0]),
Float.parseFloat(vectorData[1]),
Float.parseFloat(vectorData[2])
);
Log.i("MotionProcessor", "Device calibrated at " + ZERO.toString());
} else if ( data.startsWith("sampleRate")) {
this.sampleRate = Float.parseFloat(data.split(" ")[1]);
}
}
/**
* Function for setting the gesture path of the processor.
*
* @param path The path to set.
*/
public void setGesturePath(GesturePath path) {
this.path = path;
}
/**
* Function for adding motion data to the processor.
*
* @param data The motion data to add.
*/
public void addMotionData(MotionData data) {
preprocessedData.add(data);
Vector3f previous = this.relativePath.isEmpty() ? ZERO : this.relativePath.get(this.relativePath.size() - 1);
Vector3f relativeVector = getRelativeVector(data).add(previous);
this.relativePath.add(relativeVector);
motionDataConsumer.accept(relativeVector, data, this.relativePath.size(), this.sampleRate);
}
/**
* Function for updating the relative path.
*
* @param relativePath The new relative path.
*/
public void setRelativePath(List<Vector3f> relativePath) {
this.relativePath.clear();
this.relativePath.addAll(relativePath);
}
/**
* Function for setting the motion data receiver.
* @param consumer The consumer to set.
*/
public void setMotionDataEventHandler(IMotionDataConsumer consumer) {
if ( consumer != null)
this.motionDataConsumer = consumer;
}
/**
* Function for getting the relative vector of the motion data.
* This function will calculate the relative position of the motion data
* based on its acceleration and rotation vectors. This has to be done since
* the acceleration vector is relative to its own rotation vector.
*
* @param motionData The motion data to calculate the relative vector for.
* @return The relative vector of the motion data.
*/
public Vector3f getRelativeVector(MotionData motionData) {
// Rotate the acceleration vector back by the rotation vector to make it
// perpendicular to the gravity vector, then apply double integration to get the relative position.
// s = 1/2 * a * t^2
return motionData.acceleration
.rotateX(-motionData.rotation.x)
.rotateY(-motionData.rotation.y)
.rotateZ(-motionData.rotation.z)
.div(2)
.mul(sampleRate * sampleRate);
}
/**
* Function for getting the error offsets of the provided path and the
* received motion data.
*
* @param referencePath The reference path to compare the motion data to.
* @return A list of error offsets of the motion data compared to the reference path.
*/
public List<Double> getErrors(GesturePath referencePath) {
// Return the errors of the relative path compared to the reference path.
return relativePath
.stream()
.map(referencePath::getError)
.collect(Collectors.toList());
}
/**
* Function for getting the error offsets of the motion data compared to the
* reference path.
*
* @return A list of error offsets of the motion data compared to the reference path.
* If no path is set, an empty list will be returned.
*/
public List<Double> getErrors() {
if ( path == null)
return new ArrayList<>();
return getErrors(path);
}
/**
* Function for getting the error of the motion data compared to the reference path.
*
* @param path The path to compare the motion data to.
* @param referencePoint The reference point to compare the motion data to.
* @return The error of the motion data compared to the reference path.
*/
public double getError(GesturePath path, Vector3f referencePoint)
{
return path.getError(referencePoint);
}
/**
* Function for getting the error of the provided vector and the set path.
* If no path is set, the error will be 0.
*
* @param referencePoint The reference point to compare the path data to.
* @return The error of the motion data compared to the reference path.
*/
public double getError(Vector3f referencePoint) {
if ( path == null)
return 0;
return path.getError(referencePoint);
}
/**
* Function for calculating the average error of the motion data
* compared to the reference path.
*
* @param referencePath The reference path to compare the motion data to.
* @return The average error of the motion data compared to the reference path.
*/
public double getAverageError(GesturePath referencePath) {
return getErrors(referencePath)
.stream()
.mapToDouble(Double::doubleValue)
.average()
.orElse(0.0D);
}
/**
* Function for calculating the average error of the motion data
* compared to the reference path.
*
* @return The average error of the motion data compared to the reference path.
*/
public double getAverageError() {
if ( path == null)
return 0;
return getAverageError(path);
}
/**
* Function for logging the statistics of the motion data.
*
* @param referencePath The reference path to compare the motion data to.
*/
public void logStatistics(GesturePath referencePath) {
Log.i("MotionProcessor", "Average path error: " + getAverageError(referencePath));
Log.i("MotionProcessor", "Path length: " + relativePath.size());
Log.i("MotionProcessor", "Sample rate: " + sampleRate);
Log.i("MotionProcessor", "Calibration point: " + ZERO.toString());
}
}

View File

@@ -0,0 +1,9 @@
package com.example.fitbot.util.server;
/**
* Interface for handling WebSocket events.
*/
public interface IWebServerHandler {
void onReceive(String body);
}

View File

@@ -1,18 +0,0 @@
package com.example.fitbot.util.server;
import java.net.Socket;
/**
* Interface for handling WebSocket events.
*/
public interface IWebSocketHandler {
// Function for handling the connection of the WebSocket.
default void onConnected(Socket socket) {}
default void onDisconnected(Socket socket) {}
default void onMessageReceived(WebSocket.Message message, WebSocket.MessageReply replier) {}
default void onError(Socket socket, String error) {}
}

View File

@@ -0,0 +1,140 @@
package com.example.fitbot.util.server;
import android.util.Log;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.atomic.AtomicBoolean;
public class WebServer implements Runnable {
private ServerSocket serverSocket;
protected IWebServerHandler eventHandler = (input) -> {
}; // No-op.
private Thread thread;
private final AtomicBoolean forceClose = new AtomicBoolean(false);
/**
* Constructor for creating a new WebSocket server.
*/
private WebServer() {
}
/**
* Function for creating a new WebSocket server given the provided port.
*
* @return A WebSocket connection, or null if something went wrong.
*/
public static WebServer createServer() {
try {
WebServer server = new WebServer();
server.serverSocket = new ServerSocket();
server.serverSocket.bind(new InetSocketAddress(3445));
server.serverSocket.setSoTimeout(0);
Log.i("WebServer", "Server created: " + server.serverSocket.getLocalSocketAddress() + ", " + server.serverSocket.getLocalPort());
server.thread = new Thread(server);
server.thread.start();
return server;
} catch (IOException error) {
String cause = error.getMessage() == null ? "Unknown reason" : error.getMessage();
Log.e("WebServer", cause);
return null;
}
}
@Override
public void run() {
// Listen for new connections until the socket closes.
while (this.isConnected() && !this.forceClose.get()) {
try {
// Find a new connection
Socket newSocket = this.serverSocket.accept();
InputStream streamIn = newSocket.getInputStream();
OutputStream streamOut = newSocket.getOutputStream();
// Read the incoming data
BufferedReader reader = new BufferedReader(new InputStreamReader(streamIn));
StringBuilder builder = new StringBuilder();
String line;
while ((line = reader.readLine()) != null)
builder.append(line).append("\n");
// Send generic message back
streamOut.write("HTTP/1.1 200 OK\n".getBytes());
streamOut.write("Content-Type: text/html\n".getBytes());
streamOut.write("Connection: close\n".getBytes());
streamIn.close(); // Closes the reader, stream and socket connection.
streamOut.close();
newSocket.close();
String[] data = builder.toString().split("\n\n");
if (data.length > 1) { // Check if the data is valid.
this.eventHandler.onReceive(data[1]);
}
} catch (IOException error) {
String reason = error.getMessage() == null ? "Unknown reason" : error.getMessage();
Log.e("WebServerConnectionHandler", "Error listening to Socket connections: " + reason);
break;
}
}
}
/**
* Method for stopping the WebSocket server.
*/
public void stop() {
try {
this.serverSocket.close();
this.forceClose.set(true);
} catch (IOException error) {
String cause = error.getMessage() == null ? "Unknown reason" : error.getMessage();
Log.e("WebServer", cause);
}
}
/**
* Method for setting the event handler for this WebSocket server.
*
* @param handler The handler to use. This handler will parse all events
* that occur in this WebSocket connection. The events are the followed:
* - onMessageReceived(Socket, String)
* - onConnected(Socket)
* - onDisconnected(Socket)
* - onError(Socket, String)
*/
public void setEventHandler(IWebServerHandler handler) {
this.eventHandler = handler;
}
/**
* Method for getting the ServerSocket connection
*
* @return The ServerSocket connection.
*/
public ServerSocket getSocket() {
return this.serverSocket;
}
/**
* Method for checking whether this WebSocket connection is connected.
*
* @return The connection status of the WebSocket.
*/
public boolean isConnected() {
return !this.serverSocket.isClosed();
}
}

View File

@@ -1,150 +0,0 @@
package com.example.fitbot.util.server;
import android.support.annotation.Nullable;
import android.util.Log;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public class WebSocket {
private ServerSocket serverSocket;
private WebSocketConnectionHandler connectionHandler;
private final Set<Socket> clients = Collections.synchronizedSet(new HashSet<>());
protected IWebSocketHandler eventHandler = new IWebSocketHandler() {}; // NO-OP event handler.
/**
* Constructor for creating a new WebSocket server.
*/
private WebSocket() {}
/**
* Function for creating a new WebSocket server given the provided port.
* @return A WebSocket connection, or null if something went wrong.
*/
public static @Nullable WebSocket createServer() {
try {
WebSocket webSocket = new WebSocket();
webSocket.serverSocket = new ServerSocket();
webSocket.serverSocket.bind(webSocket.serverSocket.getLocalSocketAddress());
Log.i("WebSocket -- Creating new WebSocket server", "Server created: " + webSocket.serverSocket.getLocalSocketAddress() + ", " + webSocket.serverSocket.getLocalPort());
return webSocket;
} catch (IOException error)
{
String cause = error.getMessage() == null ? "Unknown reason" : error.getMessage();
Log.e("WebSocket -- Creating new WebSocket server", cause);
return null;
}
}
/**
* Method for listening for incoming connections.
*/
public void startListening() {
this.connectionHandler = new WebSocketConnectionHandler(this);
this.connectionHandler.listen();
}
/**
* Method for stopping the WebSocket server.
*/
public void stop() {
try {
this.serverSocket.close();
this.connectionHandler.stop();
} catch (IOException error) {
String cause = error.getMessage() == null ? "Unknown reason" : error.getMessage();
Log.e("WebSocket -- Closing server connection", cause);
}
}
/**
* Method for setting the event handler for this WebSocket server.
* @param handler The handler to use. This handler will parse all events
* that occur in this WebSocket connection. The events are the followed:
* - onMessageReceived(Socket, String)
* - onConnected(Socket)
* - onDisconnected(Socket)
* - onError(Socket, String)
*/
public void setEventHandler(IWebSocketHandler handler) {
this.eventHandler = handler;
}
/**
* Method for getting the ServerSocket connection
* @return The ServerSocket connection.
*/
public ServerSocket getSocket() {
return this.serverSocket;
}
/**
* Method for checking whether this WebSocket connection is connected.
* @return The connection status of the WebSocket.
*/
public boolean isConnected() {
return !this.serverSocket.isClosed();
}
/**
* Class representing a message received from a WebSocket connection.
*/
public static class Message {
// Enumerable representing message type (opcode).
public enum Opcode {
CONTINUING((byte) 0x0),
TEXT((byte) 0x1),
BINARY((byte) 0x2),
RES0((byte) 0x3), RES1((byte) 0x4), RES2((byte) 0x5), RES3((byte) 0x6), RES4((byte) 0x7),
CLOSE_CONNECTION((byte) 0x8),
PING((byte) 0x9),
PONG((byte) 0xA),
RES5((byte) 0xB), RES6((byte) 0xC), RES7((byte) 0xD), RES8((byte) 0xE), RES9((byte) 0xF);
byte opcode;
Opcode(final byte opcode) {
this.opcode = opcode;
}
/**
* Method for decoding the opcode of a message.
* @param opcode The opcode to decode.
* @return The message type.
*/
public static Opcode decode(byte opcode) {
return Opcode.values()[opcode & 0xF];
}
// Returns the opcode of this message type.
public byte getOpcode() { return this.opcode; }
}
public String message;
public WebSocketConnection connection;
/**
* Constructor for a WebSocket message.
* @param message The message that was sent
* @param connection The connection where the message came from.
*/
public Message(WebSocketConnection connection, String message) {
this.message = message;
this.connection = connection;
}
}
/**
* Interface for a message reply.
* This can be used for when a message has been received from a client
* to reply back to the client.
*/
public interface MessageReply {
void reply(String message);
}
}

View File

@@ -1,35 +0,0 @@
package com.example.fitbot.util.server;
import java.net.Socket;
public class WebSocketConnection {
private final WebSocket origin;
private final Socket socket;
/**
* Constructor for creating an arbitrary WebSocket connection (Client)
* @param connection The server connection
* @param socket The client socket
*/
public WebSocketConnection(WebSocket connection, Socket socket) {
this.origin = connection;
this.socket = socket;
}
/**
* Getter method for retrieving the WebSocket connection
* @return The WebSocket instance.
*/
public WebSocket getOrigin() {
return origin;
}
/**
* Getter method for retrieving the Client Socket connection.
* @return The Socket connection.
*/
public Socket getSocket() {
return socket;
}
}

View File

@@ -1,217 +0,0 @@
package com.example.fitbot.util.server;
import android.util.Log;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Base64;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class WebSocketConnectionHandler implements Runnable {
private final WebSocket theSocket;
private List<Socket> clients = Collections.synchronizedList(new ArrayList<>());
private Thread thread;
private boolean forceClose = false;
/**
* Constructor for WebSocketConnectionHandler.
* This class handles all new incoming Socket connections.
*
* @param webSocket The socket to check for new connections.
*/
protected WebSocketConnectionHandler(WebSocket webSocket) {
this.theSocket = webSocket;
}
@Override
public void run() {
// Listen for new connections until the socket closes.
while (theSocket.isConnected()) {
try {
// Find a new connection
Socket newSocket = this.theSocket.getSocket().accept();
this.theSocket.eventHandler.onConnected(newSocket);
clients.add(newSocket);
InputStream streamIn = newSocket.getInputStream();
OutputStream streamOut = newSocket.getOutputStream();
// Check if the connection was successfully upgraded to WebSocket
if (upgradeConnection(streamIn, streamOut)) {
applyMessageDecoder(streamIn);
}
} catch (IOException error) {
String reason = error.getMessage() == null ? "Unknown reason" : error.getMessage();
Log.e("WebSocketConnectionHandler", "Error listening to Socket connections: " + reason);
break;
}
}
}
/**
* Method for upgrading a HTTP connection to a WebSocket connection.
* This checks whether the client sent a GET header and sends back
* the required headers to upgrade the connection.
* @param streamIn The InputStream of the client socket connection.
* @param streamOut The OutputStream of the client socket connection.
* @return Whether or not the connection was successfully upgraded.
*/
private boolean upgradeConnection(InputStream streamIn, OutputStream streamOut) {
Scanner scanner = new Scanner(streamIn, "UTF-8");
String data = scanner.useDelimiter("\\r\\n\\r\\n").next();
Matcher header = Pattern.compile("^GET").matcher(data);
// Check if the header contains the GET keyword
// If this is the case, upgrade the HTTP connection to WebSocket.
if (!header.find())
return false;
Matcher match = Pattern.compile("Sec-WebSocket-Key: (.*)").matcher(data);
match.find(); // Get next match
try {
String SECAccept = Base64.getEncoder().encodeToString(
MessageDigest.getInstance("SHA-1").digest((match.group(1) + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11").getBytes(StandardCharsets.UTF_8)));
byte[] response = (
"HTTP/1.1 101 Switching Protocols\r\n" +
"Connection: Upgrade\r\n" +
"Upgrade: websocket\r\n" +
"Sec-WebSocket-Accept: " +
SECAccept + "\r\n\r\n").getBytes(StandardCharsets.UTF_8);
streamOut.write(response, 0, response.length);
} catch (IOException | NoSuchAlgorithmException error) {
Log.e("WebSocketConnectionHandler", "Failed upgrading HTTP to WebSocket connection" + error.getMessage());
return false;
}
return true;
}
/**
* Method for applying a message decoder for whenever a socket receives data.
* This method attemps to decode a message received from a WebSocket connection.
* This message is in the
* @param streamIn The message stream to decode.
*/
private void applyMessageDecoder(InputStream streamIn) {
// TODO: Implement
}
/**
* Method for decoding an encoded WebSocket message
* @param bytes The message to decode, in UTF-8 format.
* @return The decoded message.
* @throws IllegalArgumentException When the `frame` content is in an incorrect format.
*/
public static String decodeWebSocketMessage(byte[] bytes) {
// Check if the packet isn't corrupted
if (bytes.length <= 2 || (bytes[0] & 0b1110) != 0)
throw new IllegalArgumentException("Attempted to decode corrupted WebSocket frame data");
WebSocket.Message.Opcode opcode = WebSocket.Message.Opcode.decode((byte) (bytes[0] & 0b11110000));
byte payloadLength = (byte) (bytes[1] & 0b01111111); // Payload size (7 bits)
boolean fin = (bytes[0] & 0b1) != 0; // Whether this is the whole message
boolean masked = (bytes[1] & 0b10000000) != 0; // Whether the 9th bit is masked
long extendedPayloadLength = 0;
int byteOffset = 2;
// Check whether the payload length is 16-bit
if (payloadLength == 126) {
// 16-bit extended payload length (byte 2 and 3)
extendedPayloadLength = ((bytes[2] & 0xFF) << 8) | (bytes[3] & 0xFF);
byteOffset += 2;
// Check whether payload length is 64-bit
} else if (payloadLength == 127) {
// 64-bit extended payload length
for (int i = 0; i < 8; i++)
extendedPayloadLength |= (long) (bytes[2 + i] & 0xFF) << ((7 - i) * 8);
byteOffset += 8;
} else {
extendedPayloadLength = payloadLength;
}
byte[] maskingKey = null;
byte[] payloadData = new byte[(int) extendedPayloadLength];
// Check if the MASK bit was set, if so, copy the key to the `maskingKey` array.
if (masked) {
maskingKey = new byte[4];
System.arraycopy(bytes, byteOffset, maskingKey, 0, 4); // move mask bytes
byteOffset += 4;
}
// Copy payload bytes into `payloadData` array.
System.arraycopy(bytes, byteOffset, payloadData, 0, payloadData.length);
// If mask is present, decode the payload data with the mask.
if (masked)
for (int i = 0; i < payloadData.length; i++)
payloadData[i] ^= maskingKey[i % 4];
// Convert payload data to string
return new String(payloadData, StandardCharsets.UTF_8);
}
/**
* Method for checking whether the connection handler is actively listening.
* @return Whether it's listening.
*/
public boolean isActive() {
return this.thread.isAlive();
}
/**
* Method for listening to all new incoming socket connections.
*/
public void listen() {
this.thread = new Thread(this);
this.thread.start();
Log.i("WebSocketConnectionHandler", "Listening started.");
}
/**
* Method for stopping the connection handler.
*/
public void stop() {
// Close the socket connection if not already closed
if (!this.theSocket.getSocket().isClosed()) {
try {
this.theSocket.getSocket().close();
} catch (IOException error) {
Log.e("WebSocketConnectionHandler", "Failed to close the socket connection: " + error.getMessage());
}
}
// Interrupt the thread
this.thread.interrupt();
// Close all connections
this.clients.forEach(client -> {
try {
client.close();
} catch (IOException error) {
Log.e("WebSocketConnectionHandler", "Failed to close client: " + error.getMessage());
}
});
this.clients.clear();
Log.i("WebSocketConnectionHandler", "Listening stopped.");
}
}

View File

@@ -2,11 +2,12 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:radius="20dp"
android:radius="40dp"
/>
<gradient
android:startColor="#660000"
android:endColor="#990000"
android:startColor="#990000"
android:endColor="#FF0000"
android:angle="90"/>
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/lightBlue" />
<stroke android:width="2dp" android:color="#FFFFFF" />
<corners android:radius="20dp" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/midBlue" />
<stroke android:width="2dp" android:color="#FFFFFF" />
<corners android:radius="10dp" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/midderBlue" />
<corners android:radius="10dp" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/midBlue" />
<stroke android:width="2dp" android:color="#FFFFFF" />
<corners android:radius="360dp" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/darkBlue" />
<stroke android:width="4dp" android:color="@color/white" />
<corners android:radius="8dp" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#F0E4E4" />
<corners android:radius="15dp" />
</shape>

View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#00000000"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>

View File

@@ -0,0 +1,5 @@
<vector android:height="48dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
</vector>

View File

@@ -0,0 +1,5 @@
<vector android:height="48dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
</vector>

View File

@@ -0,0 +1,5 @@
<vector android:height="40dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
</vector>

View File

@@ -0,0 +1,5 @@
<vector android:height="48dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
</vector>

View File

@@ -0,0 +1,5 @@
<vector android:height="48dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"/>
</vector>

View File

@@ -1,170 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#FF0000"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#D10000"
android:pathData="M0,0h108v108h-108z"/>
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/progress">
<rotate
android:fromDegrees="270"
android:toDegrees="270">
<shape android:shape="ring">
<gradient
android:startColor="#ADD8E6"
android:endColor="#798994"
android:angle="0"
android:type="sweep"/>
<size android:width="150dp"
android:height="150dp"/>
</shape>
</rotate>
</item>
</layer-list>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/progress">
<rotate
android:fromDegrees="270"
android:toDegrees="270">
<shape android:shape="ring">
<gradient
android:startColor="#FF0000"
android:endColor="#FF0000"
android:angle="0"
android:type="sweep"/>
<size android:width="150dp"
android:height="150dp"/>
</shape>
</rotate>
</item>
</layer-list>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/progress">
<rotate
android:fromDegrees="270"
android:toDegrees="270">
<shape android:shape="ring">
<gradient
android:startColor="#00FF00"
android:endColor="#00FF00"
android:angle="0"
android:type="sweep"/>
<size android:width="150dp"
android:height="150dp"/>
</shape>
</rotate>
</item>
</layer-list>

View File

@@ -9,4 +9,5 @@
android:startColor="#990000"
android:endColor="#FF0000"
android:angle="90"/>
</shape>

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/darkBlue"
tools:context=".ui.activities.HelpActivity">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="800dp"
android:layout_height="wrap_content"
android:layout_marginStart="80dp"
android:layout_marginTop="80dp"
android:background="@drawable/border_background"
android:orientation="vertical"
android:padding="40dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:layout_marginBottom="40dp"
android:background="@drawable/border_background_3"
android:orientation="vertical"
android:paddingHorizontal="20dp"
android:paddingVertical="15dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textViewTitleEndScreen"
style="@style/TextStyleTitle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/afgerond" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:background="@drawable/border_background_3"
android:orientation="vertical"
android:padding="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textViewDescriptionEndScreen"
style="@style/TextStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/voltooid"
android:textAlignment="center" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/homeButtonEndScreen"
android:layout_width="150dp"
android:layout_height="75dp"
android:layout_marginEnd="404dp"
android:layout_marginBottom="48dp"
android:background="@drawable/red_button_gradient"
android:drawableTop="@drawable/ic_baseline_home_48"
android:drawableTint="@color/white"
android:padding="15dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</android.support.constraint.ConstraintLayout>

View File

@@ -1,25 +1,159 @@
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#232323"
android:background="@color/darkBlue"
android:fitsSystemWindows="true"
tools:context=".ui.activities.FitnessActivity"
tools:openDrawer="start">
<LinearLayout
android:layout_width="450dp"
android:layout_height="450dp"
android:layout_gravity="center"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_centerInParent="true"
app:cardCornerRadius="20dp">
<com.example.fitbot.ui.components.PersonalMotionPreviewElement
android:id="@+id/personalMotionPreviewElement"
android:visibility="visible"
<VideoView
android:id="@+id/videoView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<ProgressBar
android:id="@+id/loadingCircle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:progressTint="@color/white"/>
</RelativeLayout>
<Button
android:id="@+id/infoButtonFitness"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/red_button_gradient"
android:drawableTop="@drawable/ic_baseline_info_40"
android:drawableTint="@color/white"
android:padding="5dp"
tools:ignore="SpeakableTextPresentCheck" />
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
<LinearLayout
android:layout_width="450dp"
android:layout_height="450dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:background="@drawable/border_background"
android:orientation="vertical"
android:padding="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textViewFitnessTitle"
style="@style/TextStyleTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/exerciseTitle"
android:textAlignment="center" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="10dp"
android:background="@drawable/border_background_3"
android:padding="5dp">
<TextView
android:id="@+id/textViewFitnessShortDescription"
style="@style/TextStyleDesc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/exerciseDesc"
android:textAlignment="center" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="10dp"
android:background="@drawable/border_background_circle">
<ProgressBar
android:id="@+id/progressCircle"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:indeterminate="false"
android:max="10"
android:progress="1"
android:progressDrawable="@drawable/progress_circle" />
<TextView
android:id="@+id/progressText"
style="@style/TextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="1/10" />
</RelativeLayout>
</LinearLayout>
<Button
android:id="@+id/homeButtonFitness"
android:layout_width="150dp"
android:layout_height="75dp"
android:layout_marginStart="175dp"
android:layout_marginBottom="30dp"
android:background="@drawable/red_button_gradient"
android:drawableTop="@drawable/ic_baseline_home_48"
android:drawableTint="@color/white"
android:padding="15dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="SpeakableTextPresentCheck" />
<Button
android:id="@+id/skipButtonFitness"
android:layout_width="150dp"
android:layout_height="75dp"
android:layout_marginEnd="175dp"
android:layout_marginBottom="30dp"
android:background="@drawable/red_button_gradient"
android:drawableTop="@drawable/ic_baseline_skip_next_48"
android:drawableTint="@color/white"
android:padding="15dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="SpeakableTextPresentCheck" />
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/darkBlue"
android:fitsSystemWindows="true"
tools:context=".ui.activities.HelpActivity">
<Button
android:id="@+id/homeButtonHelp"
android:layout_width="150dp"
android:layout_height="75dp"
android:layout_marginStart="406dp"
android:layout_marginEnd="406dp"
android:layout_marginBottom="30dp"
android:background="@drawable/red_button_gradient"
android:drawableTop="@drawable/ic_baseline_home_48"
android:drawableTint="@color/white"
android:padding="15dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<LinearLayout
android:layout_width="800dp"
android:layout_height="450dp"
android:layout_marginStart="80dp"
android:layout_marginTop="24dp"
android:background="@drawable/border_background"
android:orientation="vertical"
android:padding="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:layout_marginBottom="40dp"
android:padding="16dp"
android:background="@drawable/border_background_3"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textViewTitleHelp"
style="@style/TextStyleTitle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/help" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:background="@drawable/border_background_3"
android:orientation="vertical"
android:padding="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textViewStartHelp"
style="@style/TextStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/uitlegStart"
android:textAlignment="center"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:background="@drawable/border_background_3"
android:orientation="vertical"
android:padding="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textViewHomeHelp"
style="@style/TextStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/uitlegHome"
android:textAlignment="center"/>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>

View File

@@ -4,91 +4,130 @@
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#232323"
android:fitsSystemWindows="true"
tools:context=".ui.activities.MainActivity"
tools:openDrawer="start">
<LinearLayout
<android.support.constraint.ConstraintLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="horizontal">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
layout="@layout/toolbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="215dp"
android:layout_marginTop="120dp"
android:layout_marginEnd="215dp"
android:layout_marginBottom="23dp"
android:background="@drawable/box_background"
android:orientation="vertical"
android:padding="16dp"
app:layout_constraintBottom_toTopOf="@+id/startButtonMain"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textView2"
android:layout_width="524dp"
android:layout_height="77dp"
android:layout_marginStart="378dp"
android:layout_marginTop="80dp"
android:id="@+id/textViewWelkom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/welkom_bij_fitbot"
android:textColor="@color/white"
android:textSize="64sp" />
<TextView
android:id="@+id/textView3"
android:layout_width="510dp"
android:layout_height="39dp"
android:layout_marginStart="385dp"
android:layout_marginTop="0dp"
android:id="@+id/textViewFit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/robot_helpt"
android:textColor="@color/white"
android:textSize="32sp" />
android:textSize="32sp"
android:translationX="8dp" />
</LinearLayout>
<Button
android:id="@+id/startButton"
android:layout_width="300dp"
android:layout_height="150dp"
android:layout_marginStart="490dp"
android:layout_marginTop="100dp"
android:id="@+id/startButtonMain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="365dp"
android:layout_marginTop="315dp"
android:layout_marginEnd="365dp"
android:layout_marginBottom="22dp"
android:background="@drawable/big_red_button_gradient"
android:gravity="center"
android:paddingHorizontal="25dp"
android:paddingVertical="5dp"
android:text="@string/start"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="80sp"
android:textAllCaps="false"
android:background="@drawable/red_button_gradient"/>
app:layout_constraintBottom_toTopOf="@+id/helpButtonMain"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.727" />
<Button
android:id="@+id/helpButton"
android:layout_width="160dp"
android:layout_height="80dp"
android:layout_marginStart="560dp"
android:layout_marginTop="20dp"
android:id="@+id/helpButtonMain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="420dp"
android:layout_marginTop="444dp"
android:layout_marginEnd="420dp"
android:background="@drawable/red_button_gradient"
android:gravity="center"
android:paddingHorizontal="20dp"
android:paddingVertical="5dp"
android:text="@string/help"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="40sp"
android:textAllCaps="false"
android:background="@drawable/darkred_button_gradient"/>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.258" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="375dp"
android:layout_height="375dp"
android:layout_marginStart="0dp"
android:layout_marginTop="-180dp"
app:srcCompat="@drawable/robot_logo_inverted"
android:contentDescription="@string/todo" />
android:id="@+id/imageViewRobotLogo"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_marginStart="8dp"
android:layout_marginBottom="4dp"
android:contentDescription="@string/robot_logo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/robot_logo_inverted" />
<!-- <Button-->
<!-- android:id="@+id/menu_switch_btn"-->
<!-- android:layout_width="200dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:clickable="true"-->
<!-- android:text="Go to Sport Menu"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
<!-- android:focusable="true" />-->
</LinearLayout>
</android.support.constraint.ConstraintLayout>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@color/darkBlue"
app:headerLayout="@layout/header"
app:itemIconTint="@color/white"
app:itemTextColor="@color/white"
app:menu="@menu/main_menu" />
</android.support.v4.widget.DrawerLayout>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="800dp"
android:layout_height="wrap_content"
android:background="@drawable/red_button_gradient"
android:orientation="vertical"
android:fitsSystemWindows="true">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/textViewTitleDialog"
style="@style/TextStyleTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="@string/descriptionTitle" />
<Button
android:id="@+id/closeButtonDialog"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="20dp"
android:layout_marginEnd="10dp"
android:background="@color/transparent"
android:drawableTop="@drawable/ic_baseline_close_48"
android:drawableTint="@color/white" />
</RelativeLayout>
<TextView
android:id="@+id/textViewDialogDescription"
style="@style/TextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="800dp"
android:text="@string/description"
android:layout_marginHorizontal="10dp"
android:layout_marginBottom="10dp"/>
</LinearLayout>

View File

@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="200dp"
android:orientation="vertical"
android:orientation="horizontal"
android:background="@drawable/ic_launcher_background"
android:layout_gravity="top"
android:padding="10dp">
@@ -16,6 +15,7 @@
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:src="@drawable/robot_logo"
android:tint="@color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@@ -25,6 +25,7 @@
android:layout_marginTop="60dp"
android:text="FitBot"
android:textSize="48sp"
android:textColor="@color/white"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -4,6 +4,5 @@
android:layout_height="wrap_content"
android:background="#00000000"
android:elevation="8dp"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
android:theme="@style/ToolbarNav">
</android.support.v7.widget.Toolbar>

View File

@@ -12,9 +12,6 @@
<group android:checkableBehavior="single">
<item android:title="Options">
<menu>
<item
android:id="@+id/nav_settings"
android:icon="@drawable/ic_baseline_settings_48"
@@ -23,9 +20,6 @@
android:id="@+id/nav_rate"
android:icon="@drawable/ic_baseline_star_rate_48"
android:title="Rate" />
</menu>
</item>
</group>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/fitbot_launcher_background"/>
<foreground android:drawable="@mipmap/fitbot_launcher_foreground"/>
</adaptive-icon>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/fitbot_launcher_background"/>
<foreground android:drawable="@mipmap/fitbot_launcher_foreground"/>
</adaptive-icon>

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Some files were not shown because too many files have changed in this diff Show More