brilliantsole 0.0.25 → 0.0.27
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/rightHand.glb +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 +255 -119
- package/build/brilliantsole.cjs.map +1 -1
- package/build/brilliantsole.js +283 -140
- package/build/brilliantsole.js.map +1 -1
- package/build/brilliantsole.ls.js +210 -103
- 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 +76 -60
- package/build/brilliantsole.module.js +282 -140
- package/build/brilliantsole.module.js.map +1 -1
- package/build/brilliantsole.module.min.d.ts +76 -60
- package/build/brilliantsole.module.min.js +1 -1
- package/build/brilliantsole.module.min.js.map +1 -1
- package/build/brilliantsole.node.module.d.ts +75 -60
- package/build/brilliantsole.node.module.js +254 -119
- package/build/brilliantsole.node.module.js.map +1 -1
- package/build/dts/BS.d.ts +2 -2
- package/build/dts/Device.d.ts +11 -7
- package/build/dts/DeviceManager.d.ts +1 -0
- package/build/dts/InformationManager.d.ts +6 -5
- package/build/dts/connection/BaseConnectionManager.d.ts +2 -0
- package/build/dts/connection/ClientConnectionManager.d.ts +4 -0
- package/build/dts/connection/bluetooth/BluetoothConnectionManager.d.ts +1 -0
- package/build/dts/connection/bluetooth/NobleConnectionManager.d.ts +1 -0
- package/build/dts/connection/bluetooth/WebBluetoothConnectionManager.d.ts +1 -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/server/BaseClient.d.ts +1 -0
- package/build/dts/utils/CenterOfPressureHelper.d.ts +2 -2
- package/build/dts/utils/MathUtils.d.ts +2 -0
- package/build/index.d.ts +76 -60
- package/build/index.node.d.ts +75 -60
- package/examples/3d/script.js +90 -17
- package/examples/balance/script.js +2 -1
- package/examples/basic/index.html +21 -2
- package/examples/basic/script.js +17 -3
- 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/gloves/index.html +116 -0
- package/examples/gloves/scene.html +124 -0
- package/examples/gloves/script.js +615 -0
- package/examples/graph/index.html +11 -1
- package/examples/graph/script.js +2 -2
- package/examples/pressure/index.html +180 -12
- package/examples/pressure/script.js +144 -7
- package/examples/recording/index.html +191 -183
- package/examples/server/index.html +11 -1
- package/examples/server/script.js +6 -3
- 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/webxr/script.js +3 -3
- package/package.json +1 -1
- package/src/BS.ts +3 -8
- package/src/Device.ts +41 -8
- package/src/DeviceInformationManager.ts +4 -2
- package/src/DeviceManager.ts +10 -1
- package/src/FileTransferManager.ts +1 -1
- package/src/FirmwareManager.ts +1 -1
- package/src/InformationManager.ts +24 -7
- package/src/TfliteManager.ts +1 -1
- package/src/connection/BaseConnectionManager.ts +23 -6
- package/src/connection/ClientConnectionManager.ts +13 -1
- package/src/connection/bluetooth/BluetoothConnectionManager.ts +6 -1
- package/src/connection/bluetooth/NobleConnectionManager.ts +8 -1
- package/src/connection/bluetooth/WebBluetoothConnectionManager.ts +5 -1
- package/src/devicePair/DevicePair.ts +53 -27
- package/src/devicePair/DevicePairPressureSensorDataManager.ts +51 -23
- package/src/devicePair/DevicePairSensorDataManager.ts +5 -5
- package/src/scanner/NobleScanner.ts +5 -3
- package/src/sensor/BarometerSensorDataManager.ts +1 -1
- package/src/sensor/MotionSensorDataManager.ts +1 -1
- package/src/sensor/PressureSensorDataManager.ts +13 -8
- package/src/sensor/SensorConfigurationManager.ts +3 -3
- package/src/sensor/SensorDataManager.ts +1 -1
- package/src/server/BaseClient.ts +43 -2
- package/src/server/BaseServer.ts +149 -39
- package/src/server/udp/UDPServer.ts +1 -1
- package/src/server/websocket/WebSocketClient.ts +3 -2
- package/src/server/websocket/WebSocketServer.ts +1 -1
- package/src/utils/CenterOfPressureHelper.ts +5 -5
- package/src/utils/MathUtils.ts +31 -1
- package/src/utils/ParseUtils.ts +1 -1
- package/src/utils/checksum.ts +1 -1
- package/src/utils/mcumgr.js +1 -1
|
@@ -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>
|
|
@@ -90,7 +90,17 @@
|
|
|
90
90
|
<template class="sensorTypeConfigurationTemplate">
|
|
91
91
|
<label class="sensorTypeConfiguration block">
|
|
92
92
|
<b class="sensorType"></b>
|
|
93
|
-
<input class="sensorRate" type="number" min="0" value="" disabled />ms
|
|
93
|
+
<!-- <input class="sensorRate" type="number" min="0" value="" disabled />ms -->
|
|
94
|
+
<select class="sensorRate input">
|
|
95
|
+
<optgroup label="sensor rate (ms)">
|
|
96
|
+
<option value="0">0ms</option>
|
|
97
|
+
<option value="5">5ms</option>
|
|
98
|
+
<option value="10">10ms</option>
|
|
99
|
+
<option value="20">20ms</option>
|
|
100
|
+
<option value="40">40ms</option>
|
|
101
|
+
<option value="100">100ms</option>
|
|
102
|
+
</optgroup>
|
|
103
|
+
</select>
|
|
94
104
|
</label>
|
|
95
105
|
</template>
|
|
96
106
|
|
|
@@ -223,6 +223,7 @@ BS.DeviceManager.AddEventListener("connectedDevices", (event) => {
|
|
|
223
223
|
if (device.connectionType != "client" || !device.bluetoothId) {
|
|
224
224
|
return;
|
|
225
225
|
}
|
|
226
|
+
console.log("AHHH", device.bluetoothId);
|
|
226
227
|
let connectedDeviceContainer = connectedDeviceContainers[device.bluetoothId];
|
|
227
228
|
if (!connectedDeviceContainer) {
|
|
228
229
|
connectedDeviceContainer = connectedDeviceTemplate.content.cloneNode(true).querySelector(".connectedDevice");
|
|
@@ -354,7 +355,7 @@ BS.DeviceManager.AddEventListener("connectedDevices", (event) => {
|
|
|
354
355
|
device.addEventListener("getSensorConfiguration", () => {
|
|
355
356
|
for (const sensorType in device.sensorConfiguration) {
|
|
356
357
|
connectedDeviceContainer.querySelector(
|
|
357
|
-
`.sensorTypeConfiguration[data-sensor-type="${sensorType}"] input`
|
|
358
|
+
`.sensorTypeConfiguration[data-sensor-type="${sensorType}"] .input`
|
|
358
359
|
).value = device.sensorConfiguration[sensorType];
|
|
359
360
|
}
|
|
360
361
|
});
|
|
@@ -846,7 +847,7 @@ BS.DeviceManager.AddEventListener("connectedDevices", (event) => {
|
|
|
846
847
|
});
|
|
847
848
|
|
|
848
849
|
device.addEventListener("isConnected", () => {
|
|
849
|
-
if (device.isConnected) {
|
|
850
|
+
if (device.isConnected && device.canUpdateFirmware) {
|
|
850
851
|
device.getFirmwareImages();
|
|
851
852
|
}
|
|
852
853
|
});
|
|
@@ -909,7 +910,9 @@ BS.DeviceManager.AddEventListener("connectedDevices", (event) => {
|
|
|
909
910
|
});
|
|
910
911
|
updateFirmwareUI();
|
|
911
912
|
|
|
912
|
-
device.
|
|
913
|
+
if (device.canUpdateFirmware) {
|
|
914
|
+
device.getFirmwareImages();
|
|
915
|
+
}
|
|
913
916
|
}
|
|
914
917
|
connectedDevicesContainer.appendChild(connectedDeviceContainer);
|
|
915
918
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<title>Ukaton Firmware Update | 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 type="module" src="https://unpkg.com/esp-web-tools@10/dist/web/install-button.js?module"></script>
|
|
7
|
+
</head>
|
|
8
|
+
|
|
9
|
+
<style></style>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<nav>
|
|
13
|
+
<a href="../../">home</a>
|
|
14
|
+
</nav>
|
|
15
|
+
|
|
16
|
+
<h1>Ukaton Firmware Update | BrilliantSole JavaScript SDK</h1>
|
|
17
|
+
|
|
18
|
+
<esp-web-install-button manifest="./manifest.json"></esp-web-install-button>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
Binary file
|
package/examples/webxr/script.js
CHANGED
|
@@ -8,7 +8,7 @@ console.log({ client });
|
|
|
8
8
|
|
|
9
9
|
window.client = client;
|
|
10
10
|
|
|
11
|
-
const devicePair = BS.DevicePair.
|
|
11
|
+
const devicePair = BS.DevicePair.insoles;
|
|
12
12
|
window.devicePair = devicePair;
|
|
13
13
|
|
|
14
14
|
// SCENE SETUP
|
|
@@ -948,7 +948,7 @@ devicePair.sides.forEach((side) => {
|
|
|
948
948
|
/** @type {BS.Device} */
|
|
949
949
|
const device = event.message.device;
|
|
950
950
|
|
|
951
|
-
if (device.
|
|
951
|
+
if (device.side != side) {
|
|
952
952
|
return;
|
|
953
953
|
}
|
|
954
954
|
|
|
@@ -1085,7 +1085,7 @@ devicePair.sides.forEach((side) => {
|
|
|
1085
1085
|
/** @type {BS.Device} */
|
|
1086
1086
|
const device = event.message.device;
|
|
1087
1087
|
|
|
1088
|
-
if (device.
|
|
1088
|
+
if (device.side != side) {
|
|
1089
1089
|
return;
|
|
1090
1090
|
}
|
|
1091
1091
|
|
package/package.json
CHANGED
package/src/BS.ts
CHANGED
|
@@ -18,14 +18,7 @@ export {
|
|
|
18
18
|
} from "./DeviceManager.ts";
|
|
19
19
|
|
|
20
20
|
export { DeviceInformation } from "./DeviceInformationManager.ts";
|
|
21
|
-
export {
|
|
22
|
-
DeviceType,
|
|
23
|
-
DeviceTypes,
|
|
24
|
-
MinNameLength,
|
|
25
|
-
MaxNameLength,
|
|
26
|
-
InsoleSides,
|
|
27
|
-
InsoleSide,
|
|
28
|
-
} from "./InformationManager.ts";
|
|
21
|
+
export { DeviceType, DeviceTypes, MinNameLength, MaxNameLength, Sides, Side } from "./InformationManager.ts";
|
|
29
22
|
export { SensorType, SensorTypes, ContinuousSensorType, ContinuousSensorTypes } from "./sensor/SensorDataManager.ts";
|
|
30
23
|
export { MaxSensorRate, SensorRateStep, SensorConfiguration } from "./sensor/SensorConfigurationManager.ts";
|
|
31
24
|
|
|
@@ -55,6 +48,8 @@ export {
|
|
|
55
48
|
DevicePairEventMap,
|
|
56
49
|
DevicePairEventListenerMap,
|
|
57
50
|
BoundDevicePairEventListeners,
|
|
51
|
+
DevicePairType,
|
|
52
|
+
DevicePairTypes,
|
|
58
53
|
} from "./devicePair/DevicePair.ts";
|
|
59
54
|
|
|
60
55
|
export { DiscoveredDevice } from "./scanner/BaseScanner.ts";
|