brilliantsole 0.0.26 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -10
- package/assets/3d/anchor.glb +0 -0
- package/assets/3d/coin.glb +0 -0
- package/assets/3d/glasses.glb +0 -0
- package/assets/3d/rightHand.glb +0 -0
- package/assets/audio/bounceMedium.wav +0 -0
- package/assets/audio/bounceStrong.wav +0 -0
- package/assets/audio/bounceWeak.wav +0 -0
- package/assets/audio/coin.wav +0 -0
- package/assets/audio/getUp.wav +0 -0
- package/assets/audio/grab.wav +0 -0
- package/assets/audio/kick.wav +0 -0
- package/assets/audio/platterFadeIn old.wav +0 -0
- package/assets/audio/platterFadeIn.wav +0 -0
- package/assets/audio/platterFadeOut.wav +0 -0
- package/assets/audio/punch.wav +0 -0
- package/assets/audio/punchSqueak.wav +0 -0
- package/assets/audio/purr.wav +0 -0
- package/assets/audio/purrFadeOut.wav +0 -0
- package/assets/audio/release.wav +0 -0
- package/assets/audio/splat.wav +0 -0
- package/assets/audio/stomp.wav +0 -0
- package/assets/images/ukaton-pressure-0.svg +9 -0
- package/assets/images/ukaton-pressure-1.svg +9 -0
- package/assets/images/ukaton-pressure-10.svg +9 -0
- package/assets/images/ukaton-pressure-11.svg +9 -0
- package/assets/images/ukaton-pressure-12.svg +9 -0
- package/assets/images/ukaton-pressure-13.svg +9 -0
- package/assets/images/ukaton-pressure-14.svg +9 -0
- package/assets/images/ukaton-pressure-15.svg +9 -0
- package/assets/images/ukaton-pressure-2.svg +9 -0
- package/assets/images/ukaton-pressure-3.svg +9 -0
- package/assets/images/ukaton-pressure-4.svg +9 -0
- package/assets/images/ukaton-pressure-5.svg +9 -0
- package/assets/images/ukaton-pressure-6.svg +9 -0
- package/assets/images/ukaton-pressure-7.svg +9 -0
- package/assets/images/ukaton-pressure-8.svg +9 -0
- package/assets/images/ukaton-pressure-9.svg +9 -0
- package/assets/images/ukaton-right-insole.svg +798 -0
- package/build/brilliantsole.cjs +2870 -882
- package/build/brilliantsole.cjs.map +1 -1
- package/build/brilliantsole.js +2477 -782
- package/build/brilliantsole.js.map +1 -1
- package/build/brilliantsole.ls.js +2260 -592
- package/build/brilliantsole.ls.js.map +1 -1
- package/build/brilliantsole.min.js +1 -1
- package/build/brilliantsole.min.js.map +1 -1
- package/build/brilliantsole.module.d.ts +302 -116
- package/build/brilliantsole.module.js +2468 -782
- package/build/brilliantsole.module.js.map +1 -1
- package/build/brilliantsole.module.min.d.ts +302 -116
- package/build/brilliantsole.module.min.js +1 -1
- package/build/brilliantsole.module.min.js.map +1 -1
- package/build/brilliantsole.node.module.d.ts +295 -113
- package/build/brilliantsole.node.module.js +2860 -882
- package/build/brilliantsole.node.module.js.map +1 -1
- package/build/dts/BS-output.d.ts +10 -0
- package/build/dts/BS.d.ts +21 -9
- package/build/dts/CameraManager.d.ts +72 -0
- package/build/dts/Device.d.ts +53 -16
- package/build/dts/DeviceInformationManager.d.ts +4 -4
- package/build/dts/DeviceManager.d.ts +3 -0
- package/build/dts/FileTransferManager.d.ts +18 -8
- package/build/dts/InformationManager.d.ts +8 -5
- package/build/dts/TfliteManager.d.ts +22 -2
- package/build/dts/WifiManager.d.ts +61 -0
- package/build/dts/connection/BaseConnectionManager.d.ts +37 -3
- package/build/dts/connection/ClientConnectionManager.d.ts +11 -2
- package/build/dts/connection/bluetooth/BluetoothConnectionManager.d.ts +1 -0
- package/build/dts/connection/bluetooth/NobleConnectionManager.d.ts +3 -1
- package/build/dts/connection/bluetooth/WebBluetoothConnectionManager.d.ts +2 -0
- package/build/dts/connection/bluetooth/bluetoothUUIDs.d.ts +2 -2
- package/build/dts/connection/udp/UDPConnectionManager.d.ts +28 -0
- package/build/dts/connection/webSocket/WebSocketConnectionManager.d.ts +25 -0
- package/build/dts/devicePair/DevicePair.d.ts +14 -10
- package/build/dts/devicePair/DevicePairPressureSensorDataManager.d.ts +8 -4
- package/build/dts/devicePair/DevicePairSensorDataManager.d.ts +2 -2
- package/build/dts/scanner/BaseScanner.d.ts +4 -1
- package/build/dts/scanner/NobleScanner.d.ts +2 -1
- package/build/dts/sensor/MotionSensorDataManager.d.ts +5 -2
- package/build/dts/sensor/SensorDataManager.d.ts +5 -4
- package/build/dts/server/BaseClient.d.ts +6 -3
- package/build/dts/server/ServerUtils.d.ts +1 -1
- package/build/dts/server/websocket/WebSocketUtils.d.ts +1 -1
- package/build/dts/utils/CenterOfPressureHelper.d.ts +2 -2
- package/build/dts/utils/Console.d.ts +2 -0
- package/build/dts/utils/MathUtils.d.ts +2 -0
- package/build/dts/utils/ThrottleUtils.d.ts +2 -0
- package/build/dts/vibration/VibrationManager.d.ts +19 -2
- package/build/index.d.ts +299 -113
- package/build/index.node.d.ts +292 -110
- package/examples/3d/scene.html +19 -5
- package/examples/3d/script.js +90 -17
- package/examples/3d-generic/index.html +144 -0
- package/examples/3d-generic/script.js +266 -0
- package/examples/balance/script.js +2 -1
- package/examples/basic/index.html +232 -18
- package/examples/basic/script.js +746 -106
- package/examples/bottango/index.html +11 -1
- package/examples/bottango/script.js +2 -2
- package/examples/center-of-pressure/index.html +114 -114
- package/examples/center-of-pressure/script.js +1 -1
- package/examples/device-pair/index.html +58 -58
- package/examples/device-pair/script.js +12 -8
- package/examples/edge-impulse/script.js +135 -44
- package/examples/edge-impulse-test/README.md +11 -0
- package/examples/edge-impulse-test/edge-impulse-standalone.js +7228 -0
- package/examples/edge-impulse-test/edge-impulse-standalone.wasm +0 -0
- package/examples/edge-impulse-test/index.html +75 -0
- package/examples/edge-impulse-test/run-impulse.js +135 -0
- package/examples/edge-impulse-test/script.js +200 -0
- package/examples/gloves/edge-impulse-standalone.js +7228 -0
- package/examples/gloves/edge-impulse-standalone.wasm +0 -0
- package/examples/gloves/index.html +119 -0
- package/examples/gloves/run-impulse.js +135 -0
- package/examples/gloves/scene.html +124 -0
- package/examples/gloves/script.js +931 -0
- package/examples/graph/index.html +11 -1
- package/examples/graph/script.js +94 -37
- package/examples/pressure/index.html +180 -12
- package/examples/pressure/script.js +144 -7
- package/examples/punch/index.html +135 -0
- package/examples/punch/punch.tflite +0 -0
- package/examples/punch/script.js +169 -0
- package/examples/recording/index.html +191 -183
- package/examples/server/index.html +109 -23
- package/examples/server/script.js +322 -111
- package/examples/ukaton-firmware-update/index.html +20 -0
- package/examples/ukaton-firmware-update/manifest.json +11 -0
- package/examples/ukaton-firmware-update/merged-firmware.bin +0 -0
- package/examples/utils/aframe/aframe-master.min.js +2 -0
- package/examples/utils/aframe/bs-vibration.js +150 -0
- package/examples/utils/aframe/force-pushable.js +80 -0
- package/examples/utils/aframe/grabbable-anchor.js +46 -0
- package/examples/utils/aframe/grabbable-listener.js +31 -0
- package/examples/utils/aframe/grabbable-physics-body.js +190 -0
- package/examples/utils/aframe/grow-shrink.js +25 -0
- package/examples/utils/aframe/hand-punch.js +119 -0
- package/examples/utils/aframe/my-obb-collider.js +293 -0
- package/examples/utils/aframe/occlude-hand-tracking-controls.js +47 -0
- package/examples/utils/aframe/occlude-mesh.js +42 -0
- package/examples/utils/aframe/palm-up-detector.js +47 -0
- package/examples/utils/aframe/shadow-material.js +20 -0
- package/examples/utils/aframe/soft-shadow-light.js +9 -0
- package/examples/webxr/script.js +3 -3
- package/examples/webxr-2/assets/3d/soccerBall.glb +0 -0
- package/examples/webxr-2/assets/audio/shellBounce.wav +0 -0
- package/examples/webxr-2/assets/audio/shellHit.wav +0 -0
- package/examples/webxr-2/assets/audio/shellKick.wav +0 -0
- package/examples/webxr-2/assets/audio/soccerBounce.wav +0 -0
- package/examples/webxr-2/assets/audio/soccerKick.mp3 +0 -0
- package/examples/webxr-2/assets/images/shellTexture.png +0 -0
- package/examples/webxr-2/components/bs-ankle.js +337 -0
- package/examples/webxr-2/components/coin.js +84 -0
- package/examples/webxr-2/components/custom-wrap.js +17 -0
- package/examples/webxr-2/components/goomba.js +3250 -0
- package/examples/webxr-2/components/init-shell-material.js +215 -0
- package/examples/webxr-2/components/platter.js +172 -0
- package/examples/webxr-2/components/shell.js +374 -0
- package/examples/webxr-2/components/soccer-ball.js +250 -0
- package/examples/webxr-2/components/squashed-goomba.js +249 -0
- package/examples/webxr-2/edge-impulse-standalone.js +7228 -0
- package/examples/webxr-2/edge-impulse-standalone.wasm +0 -0
- package/examples/webxr-2/index.html +996 -0
- package/examples/webxr-2/kick.tflite +0 -0
- package/examples/webxr-2/kick2.tflite +0 -0
- package/examples/webxr-2/run-impulse.js +135 -0
- package/examples/webxr-2/script.js +384 -0
- package/package.json +2 -1
- package/src/.prettierrc +4 -0
- package/src/BS.ts +66 -9
- package/src/CameraManager.ts +499 -0
- package/src/Device.ts +620 -92
- package/src/DeviceInformationManager.ts +22 -11
- package/src/DeviceManager.ts +94 -25
- package/src/FileTransferManager.ts +146 -21
- package/src/FirmwareManager.ts +1 -1
- package/src/InformationManager.ts +62 -20
- package/src/TfliteManager.ts +172 -26
- package/src/WifiManager.ts +323 -0
- package/src/connection/BaseConnectionManager.ts +145 -30
- package/src/connection/ClientConnectionManager.ts +47 -11
- package/src/connection/bluetooth/BluetoothConnectionManager.ts +14 -3
- package/src/connection/bluetooth/NobleConnectionManager.ts +155 -42
- package/src/connection/bluetooth/WebBluetoothConnectionManager.ts +104 -35
- package/src/connection/bluetooth/bluetoothUUIDs.ts +40 -13
- package/src/connection/udp/UDPConnectionManager.ts +356 -0
- package/src/connection/websocket/WebSocketConnectionManager.ts +282 -0
- package/src/devicePair/DevicePair.ts +145 -49
- package/src/devicePair/DevicePairPressureSensorDataManager.ts +72 -24
- package/src/devicePair/DevicePairSensorDataManager.ts +5 -5
- package/src/scanner/BaseScanner.ts +49 -11
- package/src/scanner/NobleScanner.ts +81 -17
- package/src/sensor/BarometerSensorDataManager.ts +1 -1
- package/src/sensor/MotionSensorDataManager.ts +22 -7
- package/src/sensor/PressureSensorDataManager.ts +47 -13
- package/src/sensor/SensorConfigurationManager.ts +75 -24
- package/src/sensor/SensorDataManager.ts +107 -26
- package/src/server/BaseClient.ts +192 -37
- package/src/server/BaseServer.ts +201 -43
- package/src/server/ServerUtils.ts +39 -9
- package/src/server/udp/UDPServer.ts +74 -23
- package/src/server/udp/UDPUtils.ts +9 -2
- package/src/server/websocket/WebSocketClient.ts +30 -9
- package/src/server/websocket/WebSocketServer.ts +1 -1
- package/src/server/websocket/WebSocketUtils.ts +4 -2
- package/src/utils/CenterOfPressureHelper.ts +5 -5
- package/src/utils/Console.ts +62 -9
- package/src/utils/MathUtils.ts +31 -1
- package/src/utils/ParseUtils.ts +25 -6
- package/src/utils/ThrottleUtils.ts +62 -0
- package/src/utils/Timer.ts +1 -1
- package/src/utils/checksum.ts +1 -1
- package/src/utils/mcumgr.js +1 -1
- package/src/vibration/VibrationManager.ts +166 -40
|
@@ -1,187 +1,195 @@
|
|
|
1
1
|
<html>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
2
|
+
<head>
|
|
3
|
+
<title>Recording | BrilliantSole JavaScript SDK</title>
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
5
|
+
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
|
|
6
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js"></script>
|
|
7
|
+
<script type="module" src="./script.js"></script>
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<style>
|
|
11
|
+
label {
|
|
12
|
+
display: block;
|
|
13
|
+
}
|
|
14
|
+
div {
|
|
15
|
+
margin-top: 1rem;
|
|
16
|
+
}
|
|
17
|
+
.noListStyle {
|
|
18
|
+
margin-top: 0;
|
|
19
|
+
list-style: none;
|
|
20
|
+
padding-left: 0;
|
|
21
|
+
}
|
|
22
|
+
.gap:not(:last-of-type) {
|
|
23
|
+
padding-bottom: 1rem;
|
|
24
|
+
}
|
|
25
|
+
.recording {
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.hidden {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.visualization {
|
|
33
|
+
overflow-x: auto;
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.visualization2 {
|
|
38
|
+
width: 3000px;
|
|
39
|
+
height: 300px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.visualization canvas {
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
45
|
+
|
|
46
|
+
<body>
|
|
47
|
+
<nav>
|
|
48
|
+
<a href="../../">home</a>
|
|
49
|
+
</nav>
|
|
50
|
+
|
|
51
|
+
<h1>Recording | BrilliantSole JavaScript SDK</h1>
|
|
52
|
+
|
|
53
|
+
<div>
|
|
54
|
+
<h2>available devices</h2>
|
|
55
|
+
<button id="getDevices" disabled hidden>get available devices</button>
|
|
56
|
+
<div id="availableDevices">
|
|
57
|
+
<template id="availableDeviceTemplate">
|
|
58
|
+
<div class="availableDevice">
|
|
59
|
+
<ul class="noListStyle">
|
|
60
|
+
<li><b>name: </b> <span class="name"></span></li>
|
|
61
|
+
<li><b>type: </b> <span class="type"></span></li>
|
|
62
|
+
<li><button class="toggleConnection">connect</button></li>
|
|
63
|
+
</ul>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div>
|
|
70
|
+
<h2>connection</h2>
|
|
71
|
+
<button id="addDevice">add device</button>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div>
|
|
75
|
+
<h2>connected devices</h2>
|
|
76
|
+
<div id="connectedDevices">
|
|
77
|
+
<template id="connectedDeviceTemplate">
|
|
78
|
+
<div class="connectedDevice">
|
|
79
|
+
<ul class="noListStyle">
|
|
80
|
+
<li><b>name: </b> <span class="name"></span></li>
|
|
81
|
+
<li><b>type: </b> <span class="type"></span></li>
|
|
82
|
+
<li>
|
|
83
|
+
<b>sensor configuration:</b>
|
|
84
|
+
<pre class="sensorConfiguration"></pre>
|
|
85
|
+
</li>
|
|
86
|
+
<li><button class="disconnect">disconnect</button></li>
|
|
87
|
+
</ul>
|
|
88
|
+
</div>
|
|
89
|
+
</template>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div>
|
|
94
|
+
<h2>sensor configuration</h2>
|
|
95
|
+
|
|
96
|
+
<div id="sensorConfiguration">
|
|
97
|
+
<template id="sensorTypeConfigurationTemplate">
|
|
98
|
+
<label class="sensorTypeConfiguration">
|
|
99
|
+
<b class="sensorType"></b>
|
|
100
|
+
<!-- <input class="sensorRate" type="number" min="0" value="" />ms -->
|
|
101
|
+
<select class="sensorRate input">
|
|
102
|
+
<optgroup label="sensor rate (ms)">
|
|
103
|
+
<option value="0">0ms</option>
|
|
104
|
+
<option value="5">5ms</option>
|
|
105
|
+
<option value="10">10ms</option>
|
|
106
|
+
<option value="20">20ms</option>
|
|
107
|
+
<option value="40">40ms</option>
|
|
108
|
+
<option value="100">100ms</option>
|
|
109
|
+
</optgroup>
|
|
110
|
+
</select>
|
|
111
|
+
</label>
|
|
112
|
+
</template>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div>
|
|
116
|
+
<label>enable sensors <input id="toggleSensorData" type="checkbox" disabled /></label>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<div>
|
|
121
|
+
<h2>recording configuration</h2>
|
|
122
|
+
<label>
|
|
123
|
+
countdown (seconds)
|
|
124
|
+
<input type="number" min="0" value="0" max="10" step="1" id="recordingCountdownInput" />
|
|
125
|
+
</label>
|
|
126
|
+
|
|
127
|
+
<label>fixed duration? <input id="isRecordingFixedDuration" type="checkbox" /></label>
|
|
128
|
+
<label>
|
|
129
|
+
duration (seconds)
|
|
130
|
+
<input type="number" min="1" value="1" max="30" step="1" id="recordingDuration" disabled />
|
|
131
|
+
</label>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div>
|
|
135
|
+
<h2>recording</h2>
|
|
136
|
+
<button id="toggleRecording" disabled>record</button>
|
|
137
|
+
<h2><span id="recordingCountdownSpan"></span></h2>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<div>
|
|
141
|
+
<h2>recordings</h2>
|
|
142
|
+
|
|
143
|
+
<div>
|
|
144
|
+
<label> load recording (json) <input id="loadAsJSON" type="file" multiple accept="application/json" /> </label>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div>
|
|
148
|
+
<button id="saveAllAsJSON" disabled>save all as json</button>
|
|
149
|
+
<button id="saveAllAsCSV" disabled hidden>save all as CSV</button>
|
|
150
|
+
<button id="deleteAllRecordings" disabled>delete all</button>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<div id="recordings">
|
|
154
|
+
<template id="recordingTemplate">
|
|
155
|
+
<div class="recording">
|
|
156
|
+
<h3><span class="timestamp"></span> (<span class="duration"></span> seconds)</h3>
|
|
139
157
|
<div>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
</div>
|
|
144
|
-
|
|
145
|
-
<div id="recordings">
|
|
146
|
-
<template id="recordingTemplate">
|
|
147
|
-
<div class="recording">
|
|
148
|
-
<h3><span class="timestamp"></span> (<span class="duration"></span> seconds)</h3>
|
|
149
|
-
<div>
|
|
150
|
-
<button class="saveAsCSV" hidden>save as csv</button>
|
|
151
|
-
<button class="saveAsJSON">save as json</button>
|
|
152
|
-
<button class="delete">delete</button>
|
|
153
|
-
</div>
|
|
154
|
-
<br />
|
|
155
|
-
<ol class="devices noListStyle"></ol>
|
|
156
|
-
<hr />
|
|
157
|
-
</div>
|
|
158
|
-
</template>
|
|
159
|
-
<template id="deviceRecordingTemplate">
|
|
160
|
-
<li class="deviceRecording gap">
|
|
161
|
-
<ul class="noListStyle">
|
|
162
|
-
<li><b>id:</b> <span class="id"></span></li>
|
|
163
|
-
<li><b>name:</b> <span class="name"></span></li>
|
|
164
|
-
<li><b>type:</b> <span class="type"></span></li>
|
|
165
|
-
<li><b>sensor types:</b> <span class="sensorTypes"></span></li>
|
|
166
|
-
</ul>
|
|
167
|
-
</li>
|
|
168
|
-
</template>
|
|
169
|
-
<template id="sensorTypeRecordingTemplate">
|
|
170
|
-
<li class="sensorTypeRecording gap">
|
|
171
|
-
<ul>
|
|
172
|
-
<li><b>sensor type:</b> <span class="sensorType"></span></li>
|
|
173
|
-
<li><b>data rate:</b> <span class="dataRate"></span>ms</li>
|
|
174
|
-
<li><b>initial timestamp:</b> <span class="initialTimestamp"></span></li>
|
|
175
|
-
<button class="toggleVisualization">visualize</button>
|
|
176
|
-
<div class="hidden visualization">
|
|
177
|
-
<div class="visualization2">
|
|
178
|
-
<canvas></canvas>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
</ul>
|
|
182
|
-
</li>
|
|
183
|
-
</template>
|
|
158
|
+
<button class="saveAsCSV" hidden>save as csv</button>
|
|
159
|
+
<button class="saveAsJSON">save as json</button>
|
|
160
|
+
<button class="delete">delete</button>
|
|
184
161
|
</div>
|
|
185
|
-
|
|
186
|
-
|
|
162
|
+
<br />
|
|
163
|
+
<ol class="devices noListStyle"></ol>
|
|
164
|
+
<hr />
|
|
165
|
+
</div>
|
|
166
|
+
</template>
|
|
167
|
+
<template id="deviceRecordingTemplate">
|
|
168
|
+
<li class="deviceRecording gap">
|
|
169
|
+
<ul class="noListStyle">
|
|
170
|
+
<li><b>id:</b> <span class="id"></span></li>
|
|
171
|
+
<li><b>name:</b> <span class="name"></span></li>
|
|
172
|
+
<li><b>type:</b> <span class="type"></span></li>
|
|
173
|
+
<li><b>sensor types:</b> <span class="sensorTypes"></span></li>
|
|
174
|
+
</ul>
|
|
175
|
+
</li>
|
|
176
|
+
</template>
|
|
177
|
+
<template id="sensorTypeRecordingTemplate">
|
|
178
|
+
<li class="sensorTypeRecording gap">
|
|
179
|
+
<ul>
|
|
180
|
+
<li><b>sensor type:</b> <span class="sensorType"></span></li>
|
|
181
|
+
<li><b>data rate:</b> <span class="dataRate"></span>ms</li>
|
|
182
|
+
<li><b>initial timestamp:</b> <span class="initialTimestamp"></span></li>
|
|
183
|
+
<button class="toggleVisualization">visualize</button>
|
|
184
|
+
<div class="hidden visualization">
|
|
185
|
+
<div class="visualization2">
|
|
186
|
+
<canvas></canvas>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</ul>
|
|
190
|
+
</li>
|
|
191
|
+
</template>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
</body>
|
|
187
195
|
</html>
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
ol {
|
|
18
18
|
margin-top: 0;
|
|
19
19
|
}
|
|
20
|
+
.hidden {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
20
23
|
</style>
|
|
21
24
|
|
|
22
25
|
<body>
|
|
@@ -27,12 +30,18 @@
|
|
|
27
30
|
<h1>Server | BrilliantSole JavaScript SDK</h1>
|
|
28
31
|
|
|
29
32
|
<div>
|
|
30
|
-
<label
|
|
33
|
+
<label
|
|
34
|
+
>webSocket url
|
|
35
|
+
<input id="webSocketUrl" type="url" placeholder="localhost"
|
|
36
|
+
/></label>
|
|
31
37
|
<button id="toggleConnection">connect</button>
|
|
32
38
|
</div>
|
|
33
39
|
|
|
34
40
|
<div>
|
|
35
|
-
<label>
|
|
41
|
+
<label>
|
|
42
|
+
is scanning available?
|
|
43
|
+
<input id="isScanningAvailable" type="checkbox" readonly disabled />
|
|
44
|
+
</label>
|
|
36
45
|
<button id="toggleScan" disabled>scan</button>
|
|
37
46
|
</div>
|
|
38
47
|
|
|
@@ -42,9 +51,21 @@
|
|
|
42
51
|
<template id="discoveredDeviceTemplate">
|
|
43
52
|
<div class="discoveredDevice">
|
|
44
53
|
<label class="block"><b>name:</b> <span class="name"></span></label>
|
|
45
|
-
<label class="block"
|
|
54
|
+
<label class="block"
|
|
55
|
+
><b>device type:</b> <span class="deviceType"></span
|
|
56
|
+
></label>
|
|
46
57
|
<label class="block"><b>rssi:</b> <span class="rssi"></span></label>
|
|
58
|
+
<label class="block hidden"
|
|
59
|
+
><b>ip address:</b> <span class="ipAddress"></span
|
|
60
|
+
></label>
|
|
61
|
+
<label class="block hidden"
|
|
62
|
+
><b>is wifi secure:</b> <span class="isWifiSecure"></span
|
|
63
|
+
></label>
|
|
47
64
|
<button class="toggleConnection">connect</button>
|
|
65
|
+
<button class="connectViaWebSockets hidden">
|
|
66
|
+
connect via webSockets
|
|
67
|
+
</button>
|
|
68
|
+
<button class="connectViaUDP hidden">connect via udp</button>
|
|
48
69
|
</div>
|
|
49
70
|
</template>
|
|
50
71
|
</div>
|
|
@@ -64,16 +85,25 @@
|
|
|
64
85
|
<pre class="deviceInformation"></pre>
|
|
65
86
|
</label>
|
|
66
87
|
|
|
67
|
-
<label class="block"
|
|
88
|
+
<label class="block"
|
|
89
|
+
><b>battery level:</b> <span class="batteryLevel"></span>%</label
|
|
90
|
+
>
|
|
68
91
|
|
|
69
92
|
<label class="block"><b>name:</b> <span class="name"></span></label>
|
|
70
93
|
<label>
|
|
71
94
|
<b>new name: </b>
|
|
72
|
-
<input
|
|
95
|
+
<input
|
|
96
|
+
class="setNameInput"
|
|
97
|
+
type="text"
|
|
98
|
+
placeholder="type in a name"
|
|
99
|
+
disabled
|
|
100
|
+
/>
|
|
73
101
|
</label>
|
|
74
102
|
<button class="setNameButton" disabled>set name</button>
|
|
75
103
|
|
|
76
|
-
<label class="block"
|
|
104
|
+
<label class="block"
|
|
105
|
+
><b>device type:</b> <span class="deviceType"></span
|
|
106
|
+
></label>
|
|
77
107
|
<label class="block">
|
|
78
108
|
<b>new type: </b>
|
|
79
109
|
<select class="setTypeSelect" disabled>
|
|
@@ -90,7 +120,17 @@
|
|
|
90
120
|
<template class="sensorTypeConfigurationTemplate">
|
|
91
121
|
<label class="sensorTypeConfiguration block">
|
|
92
122
|
<b class="sensorType"></b>
|
|
93
|
-
<input class="sensorRate" type="number" min="0" value="" disabled />ms
|
|
123
|
+
<!-- <input class="sensorRate" type="number" min="0" value="" disabled />ms -->
|
|
124
|
+
<select class="sensorRate input">
|
|
125
|
+
<optgroup label="sensor rate (ms)">
|
|
126
|
+
<option value="0">0ms</option>
|
|
127
|
+
<option value="5">5ms</option>
|
|
128
|
+
<option value="10">10ms</option>
|
|
129
|
+
<option value="20">20ms</option>
|
|
130
|
+
<option value="40">40ms</option>
|
|
131
|
+
<option value="100">100ms</option>
|
|
132
|
+
</optgroup>
|
|
133
|
+
</select>
|
|
94
134
|
</label>
|
|
95
135
|
</template>
|
|
96
136
|
|
|
@@ -100,7 +140,9 @@
|
|
|
100
140
|
</label>
|
|
101
141
|
|
|
102
142
|
<div>
|
|
103
|
-
<button class="triggerVibration" disabled>
|
|
143
|
+
<button class="triggerVibration" disabled>
|
|
144
|
+
triggerVibration
|
|
145
|
+
</button>
|
|
104
146
|
</div>
|
|
105
147
|
|
|
106
148
|
<div>
|
|
@@ -138,7 +180,12 @@
|
|
|
138
180
|
<br />
|
|
139
181
|
<label>
|
|
140
182
|
<b>new name: </b>
|
|
141
|
-
<input
|
|
183
|
+
<input
|
|
184
|
+
class="setTfliteNameInput"
|
|
185
|
+
type="text"
|
|
186
|
+
placeholder="type in a name"
|
|
187
|
+
disabled
|
|
188
|
+
/>
|
|
142
189
|
</label>
|
|
143
190
|
<button class="setTfliteNameButton" disabled>set name</button>
|
|
144
191
|
</div>
|
|
@@ -156,7 +203,9 @@
|
|
|
156
203
|
</div>
|
|
157
204
|
|
|
158
205
|
<div>
|
|
159
|
-
<label
|
|
206
|
+
<label
|
|
207
|
+
><b>sample rate:</b> <span class="tfliteSampleRate"></span
|
|
208
|
+
></label>
|
|
160
209
|
<br />
|
|
161
210
|
<label>
|
|
162
211
|
<b>new sample rate: </b>
|
|
@@ -170,7 +219,9 @@
|
|
|
170
219
|
disabled
|
|
171
220
|
/>
|
|
172
221
|
</label>
|
|
173
|
-
<button class="setTfliteSampleRateButton" disabled>
|
|
222
|
+
<button class="setTfliteSampleRateButton" disabled>
|
|
223
|
+
set sample rate
|
|
224
|
+
</button>
|
|
174
225
|
</div>
|
|
175
226
|
|
|
176
227
|
<div>
|
|
@@ -183,25 +234,44 @@
|
|
|
183
234
|
</template>
|
|
184
235
|
</div>
|
|
185
236
|
|
|
186
|
-
<button disabled class="setTfliteSensorTypes">
|
|
237
|
+
<button disabled class="setTfliteSensorTypes">
|
|
238
|
+
set sensor types
|
|
239
|
+
</button>
|
|
187
240
|
</div>
|
|
188
241
|
|
|
189
242
|
<div>
|
|
190
|
-
<label
|
|
243
|
+
<label
|
|
244
|
+
><b>is ready?</b>
|
|
245
|
+
<input type="checkbox" class="tfliteIsReady" disabled
|
|
246
|
+
/></label>
|
|
191
247
|
</div>
|
|
192
248
|
|
|
193
249
|
<div>
|
|
194
|
-
<label
|
|
250
|
+
<label
|
|
251
|
+
><b>threshold:</b> <span class="tfliteThreshold"></span
|
|
252
|
+
></label>
|
|
195
253
|
<br />
|
|
196
254
|
<label>
|
|
197
255
|
<b>new threshold: </b>
|
|
198
|
-
<input
|
|
256
|
+
<input
|
|
257
|
+
class="setTfliteThresholdInput"
|
|
258
|
+
type="number"
|
|
259
|
+
min="0"
|
|
260
|
+
value="0"
|
|
261
|
+
max="1"
|
|
262
|
+
step="0.1"
|
|
263
|
+
disabled
|
|
264
|
+
/>
|
|
199
265
|
</label>
|
|
200
|
-
<button class="setTfliteThresholdButton" disabled>
|
|
266
|
+
<button class="setTfliteThresholdButton" disabled>
|
|
267
|
+
set threshold
|
|
268
|
+
</button>
|
|
201
269
|
</div>
|
|
202
270
|
|
|
203
271
|
<div>
|
|
204
|
-
<label
|
|
272
|
+
<label
|
|
273
|
+
><b>capture delay:</b> <span class="tfliteCaptureDelay"></span
|
|
274
|
+
></label>
|
|
205
275
|
<br />
|
|
206
276
|
<label>
|
|
207
277
|
<b>new capture delay: </b>
|
|
@@ -215,15 +285,23 @@
|
|
|
215
285
|
disabled
|
|
216
286
|
/>
|
|
217
287
|
</label>
|
|
218
|
-
<button class="setTfliteCaptureDelayButton" disabled>
|
|
288
|
+
<button class="setTfliteCaptureDelayButton" disabled>
|
|
289
|
+
set capture delay
|
|
290
|
+
</button>
|
|
219
291
|
</div>
|
|
220
292
|
|
|
221
293
|
<div>
|
|
222
294
|
<label>
|
|
223
295
|
<b>inferencing enabled? </b>
|
|
224
|
-
<input
|
|
296
|
+
<input
|
|
297
|
+
class="tfliteInferencingEnabled"
|
|
298
|
+
type="checkbox"
|
|
299
|
+
disabled
|
|
300
|
+
/>
|
|
225
301
|
</label>
|
|
226
|
-
<button class="toggleTfliteInferencingEnabled" disabled>
|
|
302
|
+
<button class="toggleTfliteInferencingEnabled" disabled>
|
|
303
|
+
enable inferencing
|
|
304
|
+
</button>
|
|
227
305
|
</div>
|
|
228
306
|
|
|
229
307
|
<div>
|
|
@@ -239,11 +317,19 @@
|
|
|
239
317
|
|
|
240
318
|
<label><b>status:</b> <span class="firmwareStatus"></span></label>
|
|
241
319
|
<br />
|
|
242
|
-
<label
|
|
320
|
+
<label
|
|
321
|
+
>firmware
|
|
322
|
+
<input class="firmwareInput" type="file" accept=".bin"
|
|
323
|
+
/></label>
|
|
243
324
|
<br />
|
|
244
|
-
<button class="toggleFirmwareUpload" disabled>
|
|
325
|
+
<button class="toggleFirmwareUpload" disabled>
|
|
326
|
+
upload firmware
|
|
327
|
+
</button>
|
|
245
328
|
<progress value="0" class="firmwareUploadProgress"></progress>
|
|
246
|
-
<span
|
|
329
|
+
<span
|
|
330
|
+
class="firmwareUploadProgressPercentage"
|
|
331
|
+
style="display: none"
|
|
332
|
+
></span>
|
|
247
333
|
|
|
248
334
|
<br />
|
|
249
335
|
|