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
package/build/dts/BS.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { Vector2, Vector3, Quaternion, Euler } from "./utils/MathUtils.ts";
|
|
|
4
4
|
export { default as Device, DeviceEvent, DeviceEventMap, DeviceEventListenerMap, BoundDeviceEventListeners, } from "./Device.ts";
|
|
5
5
|
export { default as DeviceManager, DeviceManagerEvent, DeviceManagerEventMap, DeviceManagerEventListenerMap, BoundDeviceManagerEventListeners, } from "./DeviceManager.ts";
|
|
6
6
|
export { DeviceInformation } from "./DeviceInformationManager.ts";
|
|
7
|
-
export { DeviceType, DeviceTypes, MinNameLength, MaxNameLength,
|
|
7
|
+
export { DeviceType, DeviceTypes, MinNameLength, MaxNameLength, Sides, Side } from "./InformationManager.ts";
|
|
8
8
|
export { SensorType, SensorTypes, ContinuousSensorType, ContinuousSensorTypes } from "./sensor/SensorDataManager.ts";
|
|
9
9
|
export { MaxSensorRate, SensorRateStep, SensorConfiguration } from "./sensor/SensorConfigurationManager.ts";
|
|
10
10
|
export { DefaultNumberOfPressureSensors, PressureData } from "./sensor/PressureSensorDataManager.ts";
|
|
@@ -13,7 +13,7 @@ export { VibrationConfiguration, VibrationLocation, VibrationLocations, Vibratio
|
|
|
13
13
|
export { VibrationWaveformEffect, VibrationWaveformEffects } from "./vibration/VibrationWaveformEffects.ts";
|
|
14
14
|
export { FileType, FileTypes, FileTransferDirection, FileTransferDirections } from "./FileTransferManager.ts";
|
|
15
15
|
export { TfliteSensorType, TfliteSensorTypes, TfliteTask, TfliteTasks } from "./TfliteManager.ts";
|
|
16
|
-
export { default as DevicePair, DevicePairEvent, DevicePairEventMap, DevicePairEventListenerMap, BoundDevicePairEventListeners, } from "./devicePair/DevicePair.ts";
|
|
16
|
+
export { default as DevicePair, DevicePairEvent, DevicePairEventMap, DevicePairEventListenerMap, BoundDevicePairEventListeners, DevicePairType, DevicePairTypes, } from "./devicePair/DevicePair.ts";
|
|
17
17
|
export { DiscoveredDevice } from "./scanner/BaseScanner.ts";
|
|
18
18
|
/** NODE_START */
|
|
19
19
|
export { default as Scanner } from "./scanner/Scanner.ts";
|
package/build/dts/Device.d.ts
CHANGED
|
@@ -34,25 +34,26 @@ export declare const RequiredInformationConnectionMessages: TxRxMessageType[];
|
|
|
34
34
|
declare class Device {
|
|
35
35
|
#private;
|
|
36
36
|
get bluetoothId(): string | undefined;
|
|
37
|
+
get isAvailable(): boolean | undefined;
|
|
37
38
|
constructor();
|
|
38
|
-
get addEventListener(): <T extends "maxFileLength" | "getFileType" | "setFileType" | "getFileLength" | "setFileLength" | "getFileChecksum" | "setFileChecksum" | "setFileTransferCommand" | "fileTransferStatus" | "getFileBlock" | "setFileBlock" | "fileBytesTransferred" | "fileTransferProgress" | "fileTransferComplete" | "fileReceived" | "
|
|
39
|
+
get addEventListener(): <T extends "pressure" | "maxFileLength" | "getFileType" | "setFileType" | "getFileLength" | "setFileLength" | "getFileChecksum" | "setFileChecksum" | "setFileTransferCommand" | "fileTransferStatus" | "getFileBlock" | "setFileBlock" | "fileBytesTransferred" | "fileTransferProgress" | "fileTransferComplete" | "fileReceived" | "acceleration" | "gravity" | "linearAcceleration" | "gyroscope" | "magnetometer" | "gameRotation" | "rotation" | "orientation" | "activity" | "stepCounter" | "stepDetector" | "deviceOrientation" | "barometer" | "getPressurePositions" | "getSensorScalars" | "sensorData" | "getSensorConfiguration" | "setSensorConfiguration" | "getTfliteName" | "setTfliteName" | "getTfliteTask" | "setTfliteTask" | "getTfliteSampleRate" | "setTfliteSampleRate" | "getTfliteSensorTypes" | "setTfliteSensorTypes" | "tfliteIsReady" | "getTfliteCaptureDelay" | "setTfliteCaptureDelay" | "getTfliteThreshold" | "setTfliteThreshold" | "getTfliteInferencingEnabled" | "setTfliteInferencingEnabled" | "tfliteInference" | "manufacturerName" | "modelNumber" | "softwareRevision" | "hardwareRevision" | "firmwareRevision" | "pnpId" | "serialNumber" | "deviceInformation" | "isCharging" | "getBatteryCurrent" | "getMtu" | "getId" | "getName" | "setName" | "getType" | "setType" | "getCurrentTime" | "setCurrentTime" | "notConnected" | "connecting" | "connected" | "disconnecting" | "connectionStatus" | "isConnected" | "smp" | "batteryLevel" | "rx" | "tx" | "firmwareImages" | "firmwareUploadProgress" | "firmwareStatus" | "firmwareUploadComplete" | "connectionMessage">(type: T, listener: (event: {
|
|
39
40
|
type: T;
|
|
40
41
|
target: Device;
|
|
41
42
|
message: DeviceEventMessages[T];
|
|
42
43
|
}) => void, options?: {
|
|
43
44
|
once?: boolean;
|
|
44
45
|
}) => void;
|
|
45
|
-
get removeEventListener(): <T extends "maxFileLength" | "getFileType" | "setFileType" | "getFileLength" | "setFileLength" | "getFileChecksum" | "setFileChecksum" | "setFileTransferCommand" | "fileTransferStatus" | "getFileBlock" | "setFileBlock" | "fileBytesTransferred" | "fileTransferProgress" | "fileTransferComplete" | "fileReceived" | "
|
|
46
|
+
get removeEventListener(): <T extends "pressure" | "maxFileLength" | "getFileType" | "setFileType" | "getFileLength" | "setFileLength" | "getFileChecksum" | "setFileChecksum" | "setFileTransferCommand" | "fileTransferStatus" | "getFileBlock" | "setFileBlock" | "fileBytesTransferred" | "fileTransferProgress" | "fileTransferComplete" | "fileReceived" | "acceleration" | "gravity" | "linearAcceleration" | "gyroscope" | "magnetometer" | "gameRotation" | "rotation" | "orientation" | "activity" | "stepCounter" | "stepDetector" | "deviceOrientation" | "barometer" | "getPressurePositions" | "getSensorScalars" | "sensorData" | "getSensorConfiguration" | "setSensorConfiguration" | "getTfliteName" | "setTfliteName" | "getTfliteTask" | "setTfliteTask" | "getTfliteSampleRate" | "setTfliteSampleRate" | "getTfliteSensorTypes" | "setTfliteSensorTypes" | "tfliteIsReady" | "getTfliteCaptureDelay" | "setTfliteCaptureDelay" | "getTfliteThreshold" | "setTfliteThreshold" | "getTfliteInferencingEnabled" | "setTfliteInferencingEnabled" | "tfliteInference" | "manufacturerName" | "modelNumber" | "softwareRevision" | "hardwareRevision" | "firmwareRevision" | "pnpId" | "serialNumber" | "deviceInformation" | "isCharging" | "getBatteryCurrent" | "getMtu" | "getId" | "getName" | "setName" | "getType" | "setType" | "getCurrentTime" | "setCurrentTime" | "notConnected" | "connecting" | "connected" | "disconnecting" | "connectionStatus" | "isConnected" | "smp" | "batteryLevel" | "rx" | "tx" | "firmwareImages" | "firmwareUploadProgress" | "firmwareStatus" | "firmwareUploadComplete" | "connectionMessage">(type: T, listener: (event: {
|
|
46
47
|
type: T;
|
|
47
48
|
target: Device;
|
|
48
49
|
message: DeviceEventMessages[T];
|
|
49
50
|
}) => void) => void;
|
|
50
|
-
get waitForEvent(): <T extends "maxFileLength" | "getFileType" | "setFileType" | "getFileLength" | "setFileLength" | "getFileChecksum" | "setFileChecksum" | "setFileTransferCommand" | "fileTransferStatus" | "getFileBlock" | "setFileBlock" | "fileBytesTransferred" | "fileTransferProgress" | "fileTransferComplete" | "fileReceived" | "
|
|
51
|
+
get waitForEvent(): <T extends "pressure" | "maxFileLength" | "getFileType" | "setFileType" | "getFileLength" | "setFileLength" | "getFileChecksum" | "setFileChecksum" | "setFileTransferCommand" | "fileTransferStatus" | "getFileBlock" | "setFileBlock" | "fileBytesTransferred" | "fileTransferProgress" | "fileTransferComplete" | "fileReceived" | "acceleration" | "gravity" | "linearAcceleration" | "gyroscope" | "magnetometer" | "gameRotation" | "rotation" | "orientation" | "activity" | "stepCounter" | "stepDetector" | "deviceOrientation" | "barometer" | "getPressurePositions" | "getSensorScalars" | "sensorData" | "getSensorConfiguration" | "setSensorConfiguration" | "getTfliteName" | "setTfliteName" | "getTfliteTask" | "setTfliteTask" | "getTfliteSampleRate" | "setTfliteSampleRate" | "getTfliteSensorTypes" | "setTfliteSensorTypes" | "tfliteIsReady" | "getTfliteCaptureDelay" | "setTfliteCaptureDelay" | "getTfliteThreshold" | "setTfliteThreshold" | "getTfliteInferencingEnabled" | "setTfliteInferencingEnabled" | "tfliteInference" | "manufacturerName" | "modelNumber" | "softwareRevision" | "hardwareRevision" | "firmwareRevision" | "pnpId" | "serialNumber" | "deviceInformation" | "isCharging" | "getBatteryCurrent" | "getMtu" | "getId" | "getName" | "setName" | "getType" | "setType" | "getCurrentTime" | "setCurrentTime" | "notConnected" | "connecting" | "connected" | "disconnecting" | "connectionStatus" | "isConnected" | "smp" | "batteryLevel" | "rx" | "tx" | "firmwareImages" | "firmwareUploadProgress" | "firmwareStatus" | "firmwareUploadComplete" | "connectionMessage">(type: T) => Promise<{
|
|
51
52
|
type: T;
|
|
52
53
|
target: Device;
|
|
53
54
|
message: DeviceEventMessages[T];
|
|
54
55
|
}>;
|
|
55
|
-
get removeEventListeners(): <T extends "maxFileLength" | "getFileType" | "setFileType" | "getFileLength" | "setFileLength" | "getFileChecksum" | "setFileChecksum" | "setFileTransferCommand" | "fileTransferStatus" | "getFileBlock" | "setFileBlock" | "fileBytesTransferred" | "fileTransferProgress" | "fileTransferComplete" | "fileReceived" | "
|
|
56
|
+
get removeEventListeners(): <T extends "pressure" | "maxFileLength" | "getFileType" | "setFileType" | "getFileLength" | "setFileLength" | "getFileChecksum" | "setFileChecksum" | "setFileTransferCommand" | "fileTransferStatus" | "getFileBlock" | "setFileBlock" | "fileBytesTransferred" | "fileTransferProgress" | "fileTransferComplete" | "fileReceived" | "acceleration" | "gravity" | "linearAcceleration" | "gyroscope" | "magnetometer" | "gameRotation" | "rotation" | "orientation" | "activity" | "stepCounter" | "stepDetector" | "deviceOrientation" | "barometer" | "getPressurePositions" | "getSensorScalars" | "sensorData" | "getSensorConfiguration" | "setSensorConfiguration" | "getTfliteName" | "setTfliteName" | "getTfliteTask" | "setTfliteTask" | "getTfliteSampleRate" | "setTfliteSampleRate" | "getTfliteSensorTypes" | "setTfliteSensorTypes" | "tfliteIsReady" | "getTfliteCaptureDelay" | "setTfliteCaptureDelay" | "getTfliteThreshold" | "setTfliteThreshold" | "getTfliteInferencingEnabled" | "setTfliteInferencingEnabled" | "tfliteInference" | "manufacturerName" | "modelNumber" | "softwareRevision" | "hardwareRevision" | "firmwareRevision" | "pnpId" | "serialNumber" | "deviceInformation" | "isCharging" | "getBatteryCurrent" | "getMtu" | "getId" | "getName" | "setName" | "getType" | "setType" | "getCurrentTime" | "setCurrentTime" | "notConnected" | "connecting" | "connected" | "disconnecting" | "connectionStatus" | "isConnected" | "smp" | "batteryLevel" | "rx" | "tx" | "firmwareImages" | "firmwareUploadProgress" | "firmwareStatus" | "firmwareUploadComplete" | "connectionMessage">(type: T) => void;
|
|
56
57
|
get removeAllEventListeners(): () => void;
|
|
57
58
|
get connectionManager(): BaseConnectionManager | undefined;
|
|
58
59
|
set connectionManager(newConnectionManager: BaseConnectionManager | undefined);
|
|
@@ -71,7 +72,7 @@ declare class Device {
|
|
|
71
72
|
toggleConnection(): void;
|
|
72
73
|
get connectionStatus(): ConnectionStatus;
|
|
73
74
|
get isConnectionBusy(): boolean;
|
|
74
|
-
|
|
75
|
+
latestConnectionMessages: Map<ConnectionMessageType, DataView>;
|
|
75
76
|
get deviceInformation(): import("./DeviceInformationManager.ts").DeviceInformation;
|
|
76
77
|
get batteryLevel(): number;
|
|
77
78
|
/** @private */
|
|
@@ -82,10 +83,11 @@ declare class Device {
|
|
|
82
83
|
get getBatteryCurrent(): () => Promise<void>;
|
|
83
84
|
get name(): string;
|
|
84
85
|
get setName(): (newName: string) => Promise<void>;
|
|
85
|
-
get type(): "leftInsole" | "rightInsole";
|
|
86
|
+
get type(): "leftInsole" | "rightInsole" | "leftGlove" | "rightGlove" | "glasses" | "generic";
|
|
86
87
|
get setType(): (newType: DeviceType) => Promise<void>;
|
|
87
88
|
get isInsole(): boolean;
|
|
88
|
-
get
|
|
89
|
+
get isGlove(): boolean;
|
|
90
|
+
get side(): "left" | "right";
|
|
89
91
|
get mtu(): number;
|
|
90
92
|
get sensorTypes(): SensorType[];
|
|
91
93
|
get continuousSensorTypes(): ("pressure" | "acceleration" | "gravity" | "linearAcceleration" | "gyroscope" | "magnetometer" | "gameRotation" | "rotation" | "barometer")[];
|
|
@@ -123,6 +125,7 @@ declare class Device {
|
|
|
123
125
|
get setTfliteCaptureDelay(): (newCaptureDelay: number, sendImmediately: boolean) => Promise<void>;
|
|
124
126
|
get tfliteThreshold(): number;
|
|
125
127
|
get setTfliteThreshold(): (newThreshold: number, sendImmediately: boolean) => Promise<void>;
|
|
128
|
+
get canUpdateFirmware(): boolean | undefined;
|
|
126
129
|
private sendSmpMessage;
|
|
127
130
|
get uploadFirmware(): (file: FileLike) => Promise<void>;
|
|
128
131
|
reset(): Promise<void>;
|
|
@@ -134,5 +137,6 @@ declare class Device {
|
|
|
134
137
|
get testFirmwareImage(): (imageIndex?: number) => Promise<void>;
|
|
135
138
|
get isServerSide(): boolean;
|
|
136
139
|
set isServerSide(newIsServerSide: boolean);
|
|
140
|
+
get isUkaton(): boolean;
|
|
137
141
|
}
|
|
138
142
|
export default Device;
|
|
@@ -64,6 +64,7 @@ declare class DeviceManager {
|
|
|
64
64
|
}) => void) => void;
|
|
65
65
|
get RemoveEventListeners(): <T extends "deviceConnected" | "deviceDisconnected" | "deviceIsConnected" | "availableDevices" | "connectedDevices">(type: T) => void;
|
|
66
66
|
get RemoveAllEventListeners(): () => void;
|
|
67
|
+
_CheckDeviceAvailability(device: Device): void;
|
|
67
68
|
}
|
|
68
69
|
declare const _default: DeviceManager;
|
|
69
70
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Device, { SendMessageCallback } from "./Device.ts";
|
|
2
2
|
import EventDispatcher from "./utils/EventDispatcher.ts";
|
|
3
|
-
export declare const DeviceTypes: readonly ["leftInsole", "rightInsole"];
|
|
3
|
+
export declare const DeviceTypes: readonly ["leftInsole", "rightInsole", "leftGlove", "rightGlove", "glasses", "generic"];
|
|
4
4
|
export type DeviceType = (typeof DeviceTypes)[number];
|
|
5
|
-
export declare const
|
|
6
|
-
export type
|
|
5
|
+
export declare const Sides: readonly ["left", "right"];
|
|
6
|
+
export type Side = (typeof Sides)[number];
|
|
7
7
|
export declare const MinNameLength = 2;
|
|
8
8
|
export declare const MaxNameLength = 30;
|
|
9
9
|
export declare const InformationMessageTypes: readonly ["isCharging", "getBatteryCurrent", "getMtu", "getId", "getName", "setName", "getType", "setType", "getCurrentTime", "setCurrentTime"];
|
|
@@ -52,12 +52,13 @@ declare class InformationManager {
|
|
|
52
52
|
get name(): string;
|
|
53
53
|
updateName(updatedName: string): void;
|
|
54
54
|
setName(newName: string): Promise<void>;
|
|
55
|
-
get type(): "leftInsole" | "rightInsole";
|
|
55
|
+
get type(): "leftInsole" | "rightInsole" | "leftGlove" | "rightGlove" | "glasses" | "generic";
|
|
56
56
|
get typeEnum(): number;
|
|
57
57
|
updateType(updatedType: DeviceType): void;
|
|
58
58
|
setType(newType: DeviceType): Promise<void>;
|
|
59
59
|
get isInsole(): boolean;
|
|
60
|
-
get
|
|
60
|
+
get isGlove(): boolean;
|
|
61
|
+
get side(): Side;
|
|
61
62
|
get mtu(): number;
|
|
62
63
|
get isCurrentTimeSet(): boolean;
|
|
63
64
|
parseMessage(messageType: InformationMessageType, dataView: DataView): void;
|
|
@@ -42,12 +42,14 @@ declare abstract class BaseConnectionManager {
|
|
|
42
42
|
protected get baseConstructor(): typeof BaseConnectionManager;
|
|
43
43
|
static get isSupported(): boolean;
|
|
44
44
|
get isSupported(): boolean;
|
|
45
|
+
get canUpdateFirmware(): boolean;
|
|
45
46
|
static type: ConnectionType;
|
|
46
47
|
get type(): ConnectionType;
|
|
47
48
|
constructor();
|
|
48
49
|
get status(): "notConnected" | "connecting" | "connected" | "disconnecting";
|
|
49
50
|
protected set status(newConnectionStatus: "notConnected" | "connecting" | "connected" | "disconnecting");
|
|
50
51
|
get isConnected(): boolean;
|
|
52
|
+
get isAvailable(): boolean;
|
|
51
53
|
connect(): Promise<void>;
|
|
52
54
|
get canReconnect(): boolean;
|
|
53
55
|
reconnect(): Promise<void>;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import BaseConnectionManager, { ConnectionType } from "./BaseConnectionManager.ts";
|
|
2
2
|
import { ClientDeviceMessage } from "../server/ServerUtils.ts";
|
|
3
|
+
import BaseClient from "../server/BaseClient.ts";
|
|
3
4
|
export type SendClientMessageCallback = (...messages: ClientDeviceMessage[]) => void;
|
|
4
5
|
declare class ClientConnectionManager extends BaseConnectionManager {
|
|
5
6
|
#private;
|
|
6
7
|
static get isSupported(): boolean;
|
|
7
8
|
static get type(): ConnectionType;
|
|
9
|
+
get canUpdateFirmware(): boolean;
|
|
10
|
+
client: BaseClient;
|
|
8
11
|
get bluetoothId(): string;
|
|
9
12
|
set bluetoothId(newBluetoothId: string);
|
|
10
13
|
get isConnected(): boolean;
|
|
11
14
|
set isConnected(newIsConnected: boolean);
|
|
15
|
+
get isAvailable(): boolean;
|
|
12
16
|
connect(): Promise<void>;
|
|
13
17
|
disconnect(): Promise<void>;
|
|
14
18
|
get canReconnect(): boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import BaseConnectionManager from "../BaseConnectionManager.ts";
|
|
2
2
|
import { BluetoothCharacteristicName } from "./bluetoothUUIDs.ts";
|
|
3
3
|
declare abstract class BluetoothConnectionManager extends BaseConnectionManager {
|
|
4
|
+
get isAvailable(): boolean;
|
|
4
5
|
isInRange: boolean;
|
|
5
6
|
protected onCharacteristicValueChanged(characteristicName: BluetoothCharacteristicName, dataView: DataView): void;
|
|
6
7
|
protected writeCharacteristic(characteristicName: BluetoothCharacteristicName, data: ArrayBuffer): Promise<void>;
|
|
@@ -20,6 +20,7 @@ interface NobleCharacteristic extends noble.Characteristic, HasConnectionManager
|
|
|
20
20
|
declare class NobleConnectionManager extends BluetoothConnectionManager {
|
|
21
21
|
#private;
|
|
22
22
|
get bluetoothId(): string;
|
|
23
|
+
get canUpdateFirmware(): boolean;
|
|
23
24
|
static get isSupported(): boolean;
|
|
24
25
|
static get type(): ConnectionType;
|
|
25
26
|
get isConnected(): boolean;
|
|
@@ -5,6 +5,7 @@ import { ConnectionType } from "../BaseConnectionManager.ts";
|
|
|
5
5
|
declare class WebBluetoothConnectionManager extends BluetoothConnectionManager {
|
|
6
6
|
#private;
|
|
7
7
|
get bluetoothId(): string;
|
|
8
|
+
get canUpdateFirmware(): boolean;
|
|
8
9
|
static get isSupported(): boolean;
|
|
9
10
|
static get type(): ConnectionType;
|
|
10
11
|
get device(): BluetoothDevice | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import EventDispatcher, { BoundEventListeners, Event, EventListenerMap, EventMap } from "../utils/EventDispatcher.ts";
|
|
2
2
|
import Device, { DeviceEventType, DeviceEventMessages } from "../Device.ts";
|
|
3
|
-
import {
|
|
3
|
+
import { Side } from "../InformationManager.ts";
|
|
4
4
|
import { VibrationConfiguration } from "../vibration/VibrationManager.ts";
|
|
5
5
|
import { SensorConfiguration } from "../sensor/SensorConfigurationManager.ts";
|
|
6
6
|
import { DevicePairSensorDataEventMessages } from "./DevicePairSensorDataManager.ts";
|
|
7
7
|
import { AddPrefixToInterfaceKeys, ExtendInterfaceValues } from "../utils/TypeScriptUtils.ts";
|
|
8
8
|
interface BaseDevicePairDeviceEventMessage {
|
|
9
9
|
device: Device;
|
|
10
|
-
side:
|
|
10
|
+
side: Side;
|
|
11
11
|
}
|
|
12
12
|
type DevicePairDeviceEventMessages = ExtendInterfaceValues<AddPrefixToInterfaceKeys<DeviceEventMessages, "device">, BaseDevicePairDeviceEventMessage>;
|
|
13
13
|
export declare const DevicePairConnectionEventTypes: readonly ["isConnected"];
|
|
@@ -17,7 +17,7 @@ export interface DevicePairConnectionEventMessages {
|
|
|
17
17
|
isConnected: boolean;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
export declare const DevicePairEventTypes: readonly ["isConnected", "pressure", "sensorData", ...("deviceOrientation" | "deviceConnected" | "deviceIsConnected" | "deviceMaxFileLength" | "deviceGetFileType" | "deviceGetFileLength" | "deviceGetFileChecksum" | "deviceFileTransferStatus" | "deviceGetFileBlock" | "deviceFileTransferProgress" | "deviceFileTransferComplete" | "deviceFileReceived" | "
|
|
20
|
+
export declare const DevicePairEventTypes: readonly ["isConnected", "pressure", "sensorData", ...("deviceOrientation" | "deviceConnected" | "deviceIsConnected" | "devicePressure" | "deviceMaxFileLength" | "deviceGetFileType" | "deviceGetFileLength" | "deviceGetFileChecksum" | "deviceFileTransferStatus" | "deviceGetFileBlock" | "deviceFileTransferProgress" | "deviceFileTransferComplete" | "deviceFileReceived" | "deviceAcceleration" | "deviceGravity" | "deviceLinearAcceleration" | "deviceGyroscope" | "deviceMagnetometer" | "deviceGameRotation" | "deviceRotation" | "deviceActivity" | "deviceStepCounter" | "deviceStepDetector" | "deviceDeviceOrientation" | "deviceBarometer" | "deviceSensorData" | "deviceGetSensorConfiguration" | "deviceGetTfliteName" | "deviceGetTfliteTask" | "deviceGetTfliteSampleRate" | "deviceGetTfliteSensorTypes" | "deviceTfliteIsReady" | "deviceGetTfliteCaptureDelay" | "deviceGetTfliteThreshold" | "deviceGetTfliteInferencingEnabled" | "deviceTfliteInference" | "deviceManufacturerName" | "deviceModelNumber" | "deviceSoftwareRevision" | "deviceHardwareRevision" | "deviceFirmwareRevision" | "devicePnpId" | "deviceSerialNumber" | "deviceDeviceInformation" | "deviceIsCharging" | "deviceGetBatteryCurrent" | "deviceGetMtu" | "deviceGetId" | "deviceGetName" | "deviceGetType" | "deviceGetCurrentTime" | "deviceNotConnected" | "deviceConnecting" | "deviceDisconnecting" | "deviceConnectionStatus" | "deviceSmp" | "deviceBatteryLevel" | "deviceFirmwareImages" | "deviceFirmwareUploadProgress" | "deviceFirmwareStatus" | "deviceConnectionMessage")[]];
|
|
21
21
|
export type DevicePairEventType = (typeof DevicePairEventTypes)[number];
|
|
22
22
|
export type DevicePairEventMessages = DevicePairConnectionEventMessages & DevicePairSensorDataEventMessages & DevicePairDeviceEventMessages;
|
|
23
23
|
export type DevicePairEventDispatcher = EventDispatcher<DevicePair, DevicePairEventType, DevicePairEventMessages>;
|
|
@@ -25,38 +25,42 @@ export type DevicePairEventMap = EventMap<DevicePair, DeviceEventType, DevicePai
|
|
|
25
25
|
export type DevicePairEventListenerMap = EventListenerMap<DevicePair, DeviceEventType, DevicePairEventMessages>;
|
|
26
26
|
export type DevicePairEvent = Event<DevicePair, DeviceEventType, DevicePairEventMessages>;
|
|
27
27
|
export type BoundDevicePairEventListeners = BoundEventListeners<DevicePair, DeviceEventType, DevicePairEventMessages>;
|
|
28
|
+
export declare const DevicePairTypes: readonly ["insoles", "gloves"];
|
|
29
|
+
export type DevicePairType = (typeof DevicePairTypes)[number];
|
|
28
30
|
declare class DevicePair {
|
|
29
31
|
#private;
|
|
30
|
-
constructor();
|
|
32
|
+
constructor(type: DevicePairType);
|
|
31
33
|
get sides(): readonly ["left", "right"];
|
|
32
|
-
get
|
|
34
|
+
get type(): "insoles" | "gloves";
|
|
35
|
+
get addEventListener(): <T extends "pressure" | "deviceOrientation" | "sensorData" | "isConnected" | "deviceConnected" | "deviceIsConnected" | "devicePressure" | "deviceMaxFileLength" | "deviceGetFileType" | "deviceGetFileLength" | "deviceGetFileChecksum" | "deviceFileTransferStatus" | "deviceGetFileBlock" | "deviceFileTransferProgress" | "deviceFileTransferComplete" | "deviceFileReceived" | "deviceAcceleration" | "deviceGravity" | "deviceLinearAcceleration" | "deviceGyroscope" | "deviceMagnetometer" | "deviceGameRotation" | "deviceRotation" | "deviceActivity" | "deviceStepCounter" | "deviceStepDetector" | "deviceDeviceOrientation" | "deviceBarometer" | "deviceSensorData" | "deviceGetSensorConfiguration" | "deviceGetTfliteName" | "deviceGetTfliteTask" | "deviceGetTfliteSampleRate" | "deviceGetTfliteSensorTypes" | "deviceTfliteIsReady" | "deviceGetTfliteCaptureDelay" | "deviceGetTfliteThreshold" | "deviceGetTfliteInferencingEnabled" | "deviceTfliteInference" | "deviceManufacturerName" | "deviceModelNumber" | "deviceSoftwareRevision" | "deviceHardwareRevision" | "deviceFirmwareRevision" | "devicePnpId" | "deviceSerialNumber" | "deviceDeviceInformation" | "deviceIsCharging" | "deviceGetBatteryCurrent" | "deviceGetMtu" | "deviceGetId" | "deviceGetName" | "deviceGetType" | "deviceGetCurrentTime" | "deviceNotConnected" | "deviceConnecting" | "deviceDisconnecting" | "deviceConnectionStatus" | "deviceSmp" | "deviceBatteryLevel" | "deviceFirmwareImages" | "deviceFirmwareUploadProgress" | "deviceFirmwareStatus" | "deviceConnectionMessage">(type: T, listener: (event: {
|
|
33
36
|
type: T;
|
|
34
37
|
target: DevicePair;
|
|
35
38
|
message: DevicePairEventMessages[T];
|
|
36
39
|
}) => void, options?: {
|
|
37
40
|
once?: boolean;
|
|
38
41
|
}) => void;
|
|
39
|
-
get removeEventListener(): <T extends "pressure" | "deviceOrientation" | "sensorData" | "isConnected" | "deviceConnected" | "deviceIsConnected" | "deviceMaxFileLength" | "deviceGetFileType" | "deviceGetFileLength" | "deviceGetFileChecksum" | "deviceFileTransferStatus" | "deviceGetFileBlock" | "deviceFileTransferProgress" | "deviceFileTransferComplete" | "deviceFileReceived" | "
|
|
42
|
+
get removeEventListener(): <T extends "pressure" | "deviceOrientation" | "sensorData" | "isConnected" | "deviceConnected" | "deviceIsConnected" | "devicePressure" | "deviceMaxFileLength" | "deviceGetFileType" | "deviceGetFileLength" | "deviceGetFileChecksum" | "deviceFileTransferStatus" | "deviceGetFileBlock" | "deviceFileTransferProgress" | "deviceFileTransferComplete" | "deviceFileReceived" | "deviceAcceleration" | "deviceGravity" | "deviceLinearAcceleration" | "deviceGyroscope" | "deviceMagnetometer" | "deviceGameRotation" | "deviceRotation" | "deviceActivity" | "deviceStepCounter" | "deviceStepDetector" | "deviceDeviceOrientation" | "deviceBarometer" | "deviceSensorData" | "deviceGetSensorConfiguration" | "deviceGetTfliteName" | "deviceGetTfliteTask" | "deviceGetTfliteSampleRate" | "deviceGetTfliteSensorTypes" | "deviceTfliteIsReady" | "deviceGetTfliteCaptureDelay" | "deviceGetTfliteThreshold" | "deviceGetTfliteInferencingEnabled" | "deviceTfliteInference" | "deviceManufacturerName" | "deviceModelNumber" | "deviceSoftwareRevision" | "deviceHardwareRevision" | "deviceFirmwareRevision" | "devicePnpId" | "deviceSerialNumber" | "deviceDeviceInformation" | "deviceIsCharging" | "deviceGetBatteryCurrent" | "deviceGetMtu" | "deviceGetId" | "deviceGetName" | "deviceGetType" | "deviceGetCurrentTime" | "deviceNotConnected" | "deviceConnecting" | "deviceDisconnecting" | "deviceConnectionStatus" | "deviceSmp" | "deviceBatteryLevel" | "deviceFirmwareImages" | "deviceFirmwareUploadProgress" | "deviceFirmwareStatus" | "deviceConnectionMessage">(type: T, listener: (event: {
|
|
40
43
|
type: T;
|
|
41
44
|
target: DevicePair;
|
|
42
45
|
message: DevicePairEventMessages[T];
|
|
43
46
|
}) => void) => void;
|
|
44
|
-
get waitForEvent(): <T extends "pressure" | "deviceOrientation" | "sensorData" | "isConnected" | "deviceConnected" | "deviceIsConnected" | "deviceMaxFileLength" | "deviceGetFileType" | "deviceGetFileLength" | "deviceGetFileChecksum" | "deviceFileTransferStatus" | "deviceGetFileBlock" | "deviceFileTransferProgress" | "deviceFileTransferComplete" | "deviceFileReceived" | "
|
|
47
|
+
get waitForEvent(): <T extends "pressure" | "deviceOrientation" | "sensorData" | "isConnected" | "deviceConnected" | "deviceIsConnected" | "devicePressure" | "deviceMaxFileLength" | "deviceGetFileType" | "deviceGetFileLength" | "deviceGetFileChecksum" | "deviceFileTransferStatus" | "deviceGetFileBlock" | "deviceFileTransferProgress" | "deviceFileTransferComplete" | "deviceFileReceived" | "deviceAcceleration" | "deviceGravity" | "deviceLinearAcceleration" | "deviceGyroscope" | "deviceMagnetometer" | "deviceGameRotation" | "deviceRotation" | "deviceActivity" | "deviceStepCounter" | "deviceStepDetector" | "deviceDeviceOrientation" | "deviceBarometer" | "deviceSensorData" | "deviceGetSensorConfiguration" | "deviceGetTfliteName" | "deviceGetTfliteTask" | "deviceGetTfliteSampleRate" | "deviceGetTfliteSensorTypes" | "deviceTfliteIsReady" | "deviceGetTfliteCaptureDelay" | "deviceGetTfliteThreshold" | "deviceGetTfliteInferencingEnabled" | "deviceTfliteInference" | "deviceManufacturerName" | "deviceModelNumber" | "deviceSoftwareRevision" | "deviceHardwareRevision" | "deviceFirmwareRevision" | "devicePnpId" | "deviceSerialNumber" | "deviceDeviceInformation" | "deviceIsCharging" | "deviceGetBatteryCurrent" | "deviceGetMtu" | "deviceGetId" | "deviceGetName" | "deviceGetType" | "deviceGetCurrentTime" | "deviceNotConnected" | "deviceConnecting" | "deviceDisconnecting" | "deviceConnectionStatus" | "deviceSmp" | "deviceBatteryLevel" | "deviceFirmwareImages" | "deviceFirmwareUploadProgress" | "deviceFirmwareStatus" | "deviceConnectionMessage">(type: T) => Promise<{
|
|
45
48
|
type: T;
|
|
46
49
|
target: DevicePair;
|
|
47
50
|
message: DevicePairEventMessages[T];
|
|
48
51
|
}>;
|
|
49
|
-
get removeEventListeners(): <T extends "pressure" | "deviceOrientation" | "sensorData" | "isConnected" | "deviceConnected" | "deviceIsConnected" | "deviceMaxFileLength" | "deviceGetFileType" | "deviceGetFileLength" | "deviceGetFileChecksum" | "deviceFileTransferStatus" | "deviceGetFileBlock" | "deviceFileTransferProgress" | "deviceFileTransferComplete" | "deviceFileReceived" | "
|
|
52
|
+
get removeEventListeners(): <T extends "pressure" | "deviceOrientation" | "sensorData" | "isConnected" | "deviceConnected" | "deviceIsConnected" | "devicePressure" | "deviceMaxFileLength" | "deviceGetFileType" | "deviceGetFileLength" | "deviceGetFileChecksum" | "deviceFileTransferStatus" | "deviceGetFileBlock" | "deviceFileTransferProgress" | "deviceFileTransferComplete" | "deviceFileReceived" | "deviceAcceleration" | "deviceGravity" | "deviceLinearAcceleration" | "deviceGyroscope" | "deviceMagnetometer" | "deviceGameRotation" | "deviceRotation" | "deviceActivity" | "deviceStepCounter" | "deviceStepDetector" | "deviceDeviceOrientation" | "deviceBarometer" | "deviceSensorData" | "deviceGetSensorConfiguration" | "deviceGetTfliteName" | "deviceGetTfliteTask" | "deviceGetTfliteSampleRate" | "deviceGetTfliteSensorTypes" | "deviceTfliteIsReady" | "deviceGetTfliteCaptureDelay" | "deviceGetTfliteThreshold" | "deviceGetTfliteInferencingEnabled" | "deviceTfliteInference" | "deviceManufacturerName" | "deviceModelNumber" | "deviceSoftwareRevision" | "deviceHardwareRevision" | "deviceFirmwareRevision" | "devicePnpId" | "deviceSerialNumber" | "deviceDeviceInformation" | "deviceIsCharging" | "deviceGetBatteryCurrent" | "deviceGetMtu" | "deviceGetId" | "deviceGetName" | "deviceGetType" | "deviceGetCurrentTime" | "deviceNotConnected" | "deviceConnecting" | "deviceDisconnecting" | "deviceConnectionStatus" | "deviceSmp" | "deviceBatteryLevel" | "deviceFirmwareImages" | "deviceFirmwareUploadProgress" | "deviceFirmwareStatus" | "deviceConnectionMessage">(type: T) => void;
|
|
50
53
|
get removeAllEventListeners(): () => void;
|
|
51
54
|
get left(): Device | undefined;
|
|
52
55
|
get right(): Device | undefined;
|
|
53
56
|
get isConnected(): boolean;
|
|
54
57
|
get isPartiallyConnected(): boolean;
|
|
55
58
|
get isHalfConnected(): boolean;
|
|
56
|
-
|
|
59
|
+
assignDevice(device: Device): Device | undefined;
|
|
57
60
|
setSensorConfiguration(sensorConfiguration: SensorConfiguration): Promise<void>;
|
|
58
61
|
resetPressureRange(): void;
|
|
59
62
|
triggerVibration(vibrationConfigurations: VibrationConfiguration[], sendImmediately?: boolean): Promise<PromiseSettledResult<void | undefined>[]>;
|
|
60
|
-
static get
|
|
63
|
+
static get insoles(): DevicePair;
|
|
64
|
+
static get gloves(): DevicePair;
|
|
61
65
|
}
|
|
62
66
|
export default DevicePair;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { PressureData } from "../sensor/PressureSensorDataManager.ts";
|
|
1
|
+
import { PressureData, PressureSensorValue } from "../sensor/PressureSensorDataManager.ts";
|
|
2
2
|
import { CenterOfPressure } from "../utils/CenterOfPressureHelper.ts";
|
|
3
|
-
import {
|
|
3
|
+
import { Side } from "../InformationManager.ts";
|
|
4
4
|
import { DeviceEventMap } from "../Device.ts";
|
|
5
5
|
export type DevicePairRawPressureData = {
|
|
6
|
-
[
|
|
6
|
+
[side in Side]: PressureData;
|
|
7
7
|
};
|
|
8
8
|
export interface DevicePairPressureData {
|
|
9
|
-
|
|
9
|
+
sensors: {
|
|
10
|
+
[key in Side]: PressureSensorValue[];
|
|
11
|
+
};
|
|
12
|
+
scaledSum: number;
|
|
10
13
|
normalizedSum: number;
|
|
11
14
|
center?: CenterOfPressure;
|
|
12
15
|
normalizedCenter?: CenterOfPressure;
|
|
@@ -19,6 +22,7 @@ export interface DevicePairPressureDataEventMessages {
|
|
|
19
22
|
}
|
|
20
23
|
declare class DevicePairPressureSensorDataManager {
|
|
21
24
|
#private;
|
|
25
|
+
constructor();
|
|
22
26
|
resetPressureRange(): void;
|
|
23
27
|
onDevicePressureData(event: DeviceEventMap["pressure"]): DevicePairPressureData | undefined;
|
|
24
28
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import DevicePairPressureSensorDataManager, { DevicePairPressureDataEventMessages } from "./DevicePairPressureSensorDataManager.ts";
|
|
2
|
-
import {
|
|
2
|
+
import { Side } from "../InformationManager.ts";
|
|
3
3
|
import { DeviceEventMap } from "../Device.ts";
|
|
4
4
|
import EventDispatcher from "../utils/EventDispatcher.ts";
|
|
5
5
|
import DevicePair from "./DevicePair.ts";
|
|
@@ -9,7 +9,7 @@ export type DevicePairSensorType = (typeof DevicePairSensorTypes)[number];
|
|
|
9
9
|
export declare const DevicePairSensorDataEventTypes: readonly ["pressure", "sensorData"];
|
|
10
10
|
export type DevicePairSensorDataEventType = (typeof DevicePairSensorDataEventTypes)[number];
|
|
11
11
|
export type DevicePairSensorDataTimestamps = {
|
|
12
|
-
[
|
|
12
|
+
[side in Side]: number;
|
|
13
13
|
};
|
|
14
14
|
interface BaseDevicePairSensorDataEventMessage {
|
|
15
15
|
timestamps: DevicePairSensorDataTimestamps;
|
|
@@ -62,6 +62,7 @@ declare abstract class BaseClient {
|
|
|
62
62
|
protected get _connectionStatus(): "notConnected" | "connecting" | "connected" | "disconnecting";
|
|
63
63
|
protected set _connectionStatus(newConnectionStatus: "notConnected" | "connecting" | "connected" | "disconnecting");
|
|
64
64
|
get connectionStatus(): "notConnected" | "connecting" | "connected" | "disconnecting";
|
|
65
|
+
protected _sendRequiredMessages(): void;
|
|
65
66
|
protected parseMessage(dataView: DataView): void;
|
|
66
67
|
get isScanningAvailable(): boolean;
|
|
67
68
|
protected requestIsScanningAvailable(): void;
|
|
@@ -9,7 +9,7 @@ declare class CenterOfPressureHelper {
|
|
|
9
9
|
#private;
|
|
10
10
|
reset(): void;
|
|
11
11
|
update(centerOfPressure: CenterOfPressure): void;
|
|
12
|
-
getNormalization(centerOfPressure: CenterOfPressure): CenterOfPressure;
|
|
13
|
-
updateAndGetNormalization(centerOfPressure: CenterOfPressure): Vector2;
|
|
12
|
+
getNormalization(centerOfPressure: CenterOfPressure, weightByRange: boolean): CenterOfPressure;
|
|
13
|
+
updateAndGetNormalization(centerOfPressure: CenterOfPressure, weightByRange: boolean): Vector2;
|
|
14
14
|
}
|
|
15
15
|
export default CenterOfPressureHelper;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PressureSensorPosition } from "../sensor/PressureSensorDataManager.ts";
|
|
1
2
|
export declare function getInterpolation(value: number, min: number, max: number, span: number): number;
|
|
2
3
|
export declare const Uint16Max: number;
|
|
3
4
|
export declare function parseTimestamp(dataView: DataView, byteOffset: number): number;
|
|
@@ -19,3 +20,4 @@ export interface Euler {
|
|
|
19
20
|
pitch: number;
|
|
20
21
|
roll: number;
|
|
21
22
|
}
|
|
23
|
+
export declare function computeVoronoiWeights(points: PressureSensorPosition[], sampleCount?: number): number[];
|