@hangtime/grip-connect 0.6.2 → 0.8.0
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 +25 -10
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -0
- package/dist/interfaces/base.interface.d.ts +1 -0
- package/dist/interfaces/base.interface.d.ts.map +1 -0
- package/dist/interfaces/base.interface.js +1 -0
- package/dist/interfaces/base.interface.js.map +1 -0
- package/dist/interfaces/callback.interface.d.ts +1 -0
- package/dist/interfaces/callback.interface.d.ts.map +1 -0
- package/dist/interfaces/callback.interface.js +1 -0
- package/dist/interfaces/callback.interface.js.map +1 -0
- package/dist/interfaces/command.interface.d.ts +7 -0
- package/dist/interfaces/command.interface.d.ts.map +1 -0
- package/dist/interfaces/command.interface.js +1 -0
- package/dist/interfaces/command.interface.js.map +1 -0
- package/dist/interfaces/device/climbro.interface.d.ts +1 -0
- package/dist/interfaces/device/climbro.interface.d.ts.map +1 -0
- package/dist/interfaces/device/climbro.interface.js +1 -0
- package/dist/interfaces/device/climbro.interface.js.map +1 -0
- package/dist/interfaces/device/entralpi.interface.d.ts +1 -0
- package/dist/interfaces/device/entralpi.interface.d.ts.map +1 -0
- package/dist/interfaces/device/entralpi.interface.js +1 -0
- package/dist/interfaces/device/entralpi.interface.js.map +1 -0
- package/dist/interfaces/device/forceboard.interface.d.ts +30 -3
- package/dist/interfaces/device/forceboard.interface.d.ts.map +1 -0
- package/dist/interfaces/device/forceboard.interface.js +1 -0
- package/dist/interfaces/device/forceboard.interface.js.map +1 -0
- package/dist/interfaces/device/kilterboard.interface.d.ts +1 -0
- package/dist/interfaces/device/kilterboard.interface.d.ts.map +1 -0
- package/dist/interfaces/device/kilterboard.interface.js +1 -0
- package/dist/interfaces/device/kilterboard.interface.js.map +1 -0
- package/dist/interfaces/device/motherboard.interface.d.ts +1 -0
- package/dist/interfaces/device/motherboard.interface.d.ts.map +1 -0
- package/dist/interfaces/device/motherboard.interface.js +1 -0
- package/dist/interfaces/device/motherboard.interface.js.map +1 -0
- package/dist/interfaces/device/mysmartboard.interface.d.ts +1 -0
- package/dist/interfaces/device/mysmartboard.interface.d.ts.map +1 -0
- package/dist/interfaces/device/mysmartboard.interface.js +1 -0
- package/dist/interfaces/device/mysmartboard.interface.js.map +1 -0
- package/dist/interfaces/device/progressor.interface.d.ts +1 -0
- package/dist/interfaces/device/progressor.interface.d.ts.map +1 -0
- package/dist/interfaces/device/progressor.interface.js +1 -0
- package/dist/interfaces/device/progressor.interface.js.map +1 -0
- package/dist/interfaces/device/smartboard-pro.interface.d.ts +7 -0
- package/dist/interfaces/device/smartboard-pro.interface.d.ts.map +1 -0
- package/dist/interfaces/device/smartboard-pro.interface.js +2 -0
- package/dist/interfaces/device/smartboard-pro.interface.js.map +1 -0
- package/dist/interfaces/device/wh-c06.interface.d.ts +1 -0
- package/dist/interfaces/device/wh-c06.interface.d.ts.map +1 -0
- package/dist/interfaces/device/wh-c06.interface.js +1 -0
- package/dist/interfaces/device/wh-c06.interface.js.map +1 -0
- package/dist/interfaces/device.interface.d.ts +1 -0
- package/dist/interfaces/device.interface.d.ts.map +1 -0
- package/dist/interfaces/device.interface.js +1 -0
- package/dist/interfaces/device.interface.js.map +1 -0
- package/dist/interfaces/download.interface.d.ts +1 -0
- package/dist/interfaces/download.interface.d.ts.map +1 -0
- package/dist/interfaces/download.interface.js +1 -0
- package/dist/interfaces/download.interface.js.map +1 -0
- package/dist/interfaces/index.d.ts +2 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/models/base.model.d.ts +1 -0
- package/dist/models/base.model.d.ts.map +1 -0
- package/dist/models/base.model.js +1 -0
- package/dist/models/base.model.js.map +1 -0
- package/dist/models/device/climbro.model.d.ts +1 -0
- package/dist/models/device/climbro.model.d.ts.map +1 -0
- package/dist/models/device/climbro.model.js +1 -0
- package/dist/models/device/climbro.model.js.map +1 -0
- package/dist/models/device/entralpi.model.d.ts +3 -2
- package/dist/models/device/entralpi.model.d.ts.map +1 -0
- package/dist/models/device/entralpi.model.js +3 -3
- package/dist/models/device/entralpi.model.js.map +1 -0
- package/dist/models/device/forceboard.model.d.ts +30 -5
- package/dist/models/device/forceboard.model.d.ts.map +1 -0
- package/dist/models/device/forceboard.model.js +97 -54
- package/dist/models/device/forceboard.model.js.map +1 -0
- package/dist/models/device/kilterboard.model.d.ts +1 -0
- package/dist/models/device/kilterboard.model.d.ts.map +1 -0
- package/dist/models/device/kilterboard.model.js +1 -0
- package/dist/models/device/kilterboard.model.js.map +1 -0
- package/dist/models/device/motherboard.model.d.ts +3 -2
- package/dist/models/device/motherboard.model.d.ts.map +1 -0
- package/dist/models/device/motherboard.model.js +3 -3
- package/dist/models/device/motherboard.model.js.map +1 -0
- package/dist/models/device/mysmartboard.model.d.ts +1 -0
- package/dist/models/device/mysmartboard.model.d.ts.map +1 -0
- package/dist/models/device/mysmartboard.model.js +1 -0
- package/dist/models/device/mysmartboard.model.js.map +1 -0
- package/dist/models/device/progressor.model.d.ts +3 -2
- package/dist/models/device/progressor.model.d.ts.map +1 -0
- package/dist/models/device/progressor.model.js +3 -3
- package/dist/models/device/progressor.model.js.map +1 -0
- package/dist/models/device/smartboard-pro.model.d.ts +11 -0
- package/dist/models/device/smartboard-pro.model.d.ts.map +1 -0
- package/dist/models/device/smartboard-pro.model.js +52 -0
- package/dist/models/device/smartboard-pro.model.js.map +1 -0
- package/dist/models/device/wh-c06.model.d.ts +1 -0
- package/dist/models/device/wh-c06.model.d.ts.map +1 -0
- package/dist/models/device/wh-c06.model.js +1 -0
- package/dist/models/device/wh-c06.model.js.map +1 -0
- package/dist/models/device.model.d.ts +6 -5
- package/dist/models/device.model.d.ts.map +1 -0
- package/dist/models/device.model.js +25 -38
- package/dist/models/device.model.js.map +1 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +2 -0
- package/dist/models/index.js.map +1 -0
- package/package.json +2 -5
- package/src/index.ts +2 -0
- package/src/interfaces/command.interface.ts +9 -0
- package/src/interfaces/device/forceboard.interface.ts +33 -3
- package/src/interfaces/device/smartboard-pro.interface.ts +6 -0
- package/src/interfaces/index.ts +2 -0
- package/src/models/device/entralpi.model.ts +2 -4
- package/src/models/device/forceboard.model.ts +104 -54
- package/src/models/device/motherboard.model.ts +2 -4
- package/src/models/device/progressor.model.ts +2 -4
- package/src/models/device/smartboard-pro.model.ts +53 -0
- package/src/models/device.model.ts +27 -43
- package/src/models/index.ts +2 -0
- package/tsconfig.json +4 -0
- package/deno.json +0 -8
|
@@ -389,34 +389,27 @@ export class Device extends BaseModel {
|
|
|
389
389
|
// HH-MM-SS
|
|
390
390
|
const time = now.toTimeString().split(" ")[0].replace(/:/g, "-");
|
|
391
391
|
const fileName = `data-export-${date}-${time}.${format}`;
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
globalThis.URL.revokeObjectURL(url);
|
|
414
|
-
}
|
|
415
|
-
else {
|
|
416
|
-
const { writeFile } = await import("node:fs/promises");
|
|
417
|
-
await writeFile(fileName, content);
|
|
418
|
-
console.log(`File saved as ${fileName}`);
|
|
419
|
-
}
|
|
392
|
+
const mimeTypes = {
|
|
393
|
+
csv: "text/csv",
|
|
394
|
+
json: "application/json",
|
|
395
|
+
xml: "application/xml",
|
|
396
|
+
};
|
|
397
|
+
// Create a Blob object containing the data
|
|
398
|
+
const blob = new Blob([content], { type: mimeTypes[format] });
|
|
399
|
+
// Create a URL for the Blob
|
|
400
|
+
const url = globalThis.URL.createObjectURL(blob);
|
|
401
|
+
// Create a link element
|
|
402
|
+
const link = document.createElement("a");
|
|
403
|
+
// Set link attributes
|
|
404
|
+
link.href = url;
|
|
405
|
+
link.setAttribute("download", fileName);
|
|
406
|
+
// Append link to document body
|
|
407
|
+
document.body.appendChild(link);
|
|
408
|
+
// Programmatically click the link to trigger the download
|
|
409
|
+
link.click();
|
|
410
|
+
// Clean up: remove the link and revoke the URL
|
|
411
|
+
document.body.removeChild(link);
|
|
412
|
+
globalThis.URL.revokeObjectURL(url);
|
|
420
413
|
};
|
|
421
414
|
/**
|
|
422
415
|
* Returns UUIDs of all services associated with the device.
|
|
@@ -444,24 +437,17 @@ export class Device extends BaseModel {
|
|
|
444
437
|
if (typeof navigator !== "undefined" && navigator.bluetooth) {
|
|
445
438
|
return navigator.bluetooth;
|
|
446
439
|
}
|
|
447
|
-
const process = await import("node:process");
|
|
448
|
-
// If running in Node, Bun, or Deno environment
|
|
449
|
-
if (typeof process !== "undefined" && process.versions?.node) {
|
|
450
|
-
const { bluetooth } = await import("webbluetooth");
|
|
451
|
-
return bluetooth;
|
|
452
|
-
}
|
|
453
440
|
// If none of the above conditions are met, throw an error.
|
|
454
441
|
throw new Error("Bluetooth not available.");
|
|
455
442
|
}
|
|
456
443
|
/**
|
|
457
444
|
* Handles notifications received from a characteristic.
|
|
458
|
-
* @param {
|
|
445
|
+
* @param {DataView} value - The notification event.
|
|
459
446
|
*
|
|
460
447
|
* @example
|
|
461
448
|
* device.handleNotifications(someCharacteristic);
|
|
462
449
|
*/
|
|
463
|
-
handleNotifications = (
|
|
464
|
-
const value = characteristic.value;
|
|
450
|
+
handleNotifications = (value) => {
|
|
465
451
|
if (!value)
|
|
466
452
|
return;
|
|
467
453
|
this.updateTimestamp();
|
|
@@ -546,7 +532,7 @@ export class Device extends BaseModel {
|
|
|
546
532
|
const target = event.target;
|
|
547
533
|
if (target && target.value) {
|
|
548
534
|
// Delegate the data to handleNotifications method
|
|
549
|
-
this.handleNotifications(target);
|
|
535
|
+
this.handleNotifications(target.value);
|
|
550
536
|
}
|
|
551
537
|
};
|
|
552
538
|
// Attach the event listener to listen for changes in the characteristic's value
|
|
@@ -729,3 +715,4 @@ export class Device extends BaseModel {
|
|
|
729
715
|
}
|
|
730
716
|
};
|
|
731
717
|
}
|
|
718
|
+
//# sourceMappingURL=device.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.model.js","sourceRoot":"","sources":["../../src/models/device.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAMlD,MAAM,OAAgB,MAAO,SAAQ,SAAS;IAC5C;;;;;;OAMG;IACM,OAAO,CAAyB;IAEzC;;;;;;OAMG;IACM,QAAQ,CAAW;IAE5B;;;;;OAKG;IACH,SAAS,CAAkB;IAE3B;;;;;;OAMG;IACM,QAAQ,CAAU;IAE3B;;;;OAIG;IACK,MAAM,CAAuC;IAErD;;;;OAIG;IACO,SAAS,GAA+B,IAAI,CAAA;IACtD;;;OAGG;IACO,QAAQ,GAAG,KAAK,CAAA;IAC1B;;OAEG;IACK,YAAY,GAA4C;QAC9D,SAAS,EAAE,GAAG;QACd,QAAQ,EAAE,IAAI;KACf,CAAA;IAED;;;;OAIG;IACO,OAAO,CAAQ;IAEzB;;;;OAIG;IACO,WAAW,CAAQ;IAE7B;;;;;OAKG;IACO,YAAY,CAAQ;IAE9B;;;;;OAKG;IACO,cAAc,CAAQ;IAEhC;;;;;OAKG;IACO,eAAe,GAAqB,EAAE,CAAA,CAAC,sDAAsD;IAEvG;;;OAGG;IACK,WAAW,GAAG,CAAC,CAAA;IAEvB;;;OAGG;IACK,UAAU,GAAG,KAAK,CAAA;IAE1B;;;OAGG;IACK,aAAa,GAAkB,IAAI,CAAA;IAE3C;;;OAGG;IACK,WAAW,GAAa,EAAE,CAAA;IAElC;;;OAGG;IACK,YAAY,GAAG,IAAI,CAAA;IAE3B;;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AQ,GAAG,CAAC,EAAE,CAAC;YACjB,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAA;QACrE,CAAC;IACH,CAAC,CAAA;CACF"}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -5,4 +5,6 @@ export { KilterBoard } from "./device/kilterboard.model";
|
|
|
5
5
|
export { Motherboard } from "./device/motherboard.model";
|
|
6
6
|
export { mySmartBoard } from "./device/mysmartboard.model";
|
|
7
7
|
export { Progressor } from "./device/progressor.model";
|
|
8
|
+
export { SmartBoardPro } from "./device/smartboard-pro.model";
|
|
8
9
|
export { WHC06 } from "./device/wh-c06.model";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/models/index.js
CHANGED
|
@@ -5,4 +5,6 @@ export { KilterBoard } from "./device/kilterboard.model";
|
|
|
5
5
|
export { Motherboard } from "./device/motherboard.model";
|
|
6
6
|
export { mySmartBoard } from "./device/mysmartboard.model";
|
|
7
7
|
export { Progressor } from "./device/progressor.model";
|
|
8
|
+
export { SmartBoardPro } from "./device/smartboard-pro.model";
|
|
8
9
|
export { WHC06 } from "./device/wh-c06.model";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hangtime/grip-connect",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Griptonite Motherboard, Tindeq Progressor, PitchSix Force Board, WHC-06, Entralpi, Climbro, mySmartBoard: Bluetooth API Force-Sensing strength analysis for climbers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,8 +33,5 @@
|
|
|
33
33
|
"bugs": {
|
|
34
34
|
"url": "https://github.com/Stevie-Ray/hangtime-grip-connect/issues"
|
|
35
35
|
},
|
|
36
|
-
"homepage": "https://stevie-ray.github.io/hangtime-grip-connect/"
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"webbluetooth": "^3.3.2"
|
|
39
|
-
}
|
|
36
|
+
"homepage": "https://stevie-ray.github.io/hangtime-grip-connect/"
|
|
40
37
|
}
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type {
|
|
|
6
6
|
IMotherboard,
|
|
7
7
|
ImySmartBoard,
|
|
8
8
|
IProgressor,
|
|
9
|
+
ISmartBoardPro,
|
|
9
10
|
IWHC06,
|
|
10
11
|
} from "./interfaces/index"
|
|
11
12
|
|
|
@@ -17,5 +18,6 @@ export {
|
|
|
17
18
|
Motherboard,
|
|
18
19
|
mySmartBoard,
|
|
19
20
|
Progressor,
|
|
21
|
+
SmartBoardPro,
|
|
20
22
|
WHC06,
|
|
21
23
|
} from "./models/index"
|
|
@@ -48,6 +48,15 @@ export interface Commands {
|
|
|
48
48
|
*/
|
|
49
49
|
GET_CALIBRATION?: string
|
|
50
50
|
|
|
51
|
+
// Force Board Portable
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Sets the Force Board into Quick Start mode.
|
|
55
|
+
* In this mode, data transmission starts when force exceeds the threshold
|
|
56
|
+
* and stops when force drops below the threshold.
|
|
57
|
+
*/
|
|
58
|
+
START_QUICK_MEAS?: string
|
|
59
|
+
|
|
51
60
|
// Tindeq Progressor
|
|
52
61
|
|
|
53
62
|
/**
|
|
@@ -23,21 +23,51 @@ export interface IForceBoard extends IDevice {
|
|
|
23
23
|
manufacturer(): Promise<string | undefined>
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* Stops the data stream on the specified device.
|
|
26
|
+
* Stops the data stream on the specified device by setting it to Idle mode.
|
|
27
|
+
* Writes 0x07 to the Device Mode characteristic.
|
|
27
28
|
* @returns {Promise<void>} A promise that resolves when the stream is stopped.
|
|
28
29
|
*/
|
|
29
30
|
stop(): Promise<void>
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
|
-
* Starts streaming data from the specified device.
|
|
33
|
+
* Starts streaming data from the specified device in Streaming Data Mode.
|
|
34
|
+
* Writes 0x04 to the Device Mode characteristic.
|
|
33
35
|
* @param {number} [duration=0] - The duration of the stream in milliseconds. If set to 0, stream will continue indefinitely.
|
|
34
36
|
* @returns {Promise<void>} A promise that resolves when the streaming operation is completed.
|
|
35
37
|
*/
|
|
36
38
|
stream(duration?: number): Promise<void>
|
|
37
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Tares the Force Board device using a characteristic to zero out the current load value.
|
|
42
|
+
* @returns {Promise<void>} A promise that resolves when the tare operation is completed.
|
|
43
|
+
*/
|
|
44
|
+
tareByCharacteristic(): Promise<void>
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Tares the Force Board device using the Device Mode characteristic.
|
|
48
|
+
* Writes 0x05 to the Device Mode characteristic to zero out the current load value.
|
|
49
|
+
* @returns {Promise<void>} A promise that resolves when the tare operation is completed.
|
|
50
|
+
*/
|
|
51
|
+
tareByMode(): Promise<void>
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Sets the threshold for the Quick Start mode.
|
|
55
|
+
* @param {number} thresholdLbs - The threshold value in pounds.
|
|
56
|
+
* @returns {Promise<void>} A promise that resolves when the threshold is set.
|
|
57
|
+
*/
|
|
58
|
+
threshold(thresholdLbs: number): Promise<void>
|
|
59
|
+
|
|
38
60
|
/**
|
|
39
61
|
* Retrieves temperature information from the device.
|
|
40
|
-
* @returns {Promise<string | undefined>} A Promise that resolves with the
|
|
62
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the temperature information.
|
|
41
63
|
*/
|
|
42
64
|
temperature(): Promise<string | undefined>
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Starts the Force Board in Quick Start mode.
|
|
68
|
+
* Writes 0x06 to the Device Mode characteristic.
|
|
69
|
+
* @param {number} [duration=0] - The duration in milliseconds. If set to 0, mode will continue indefinitely.
|
|
70
|
+
* @returns {Promise<void>} A promise that resolves when the operation is completed.
|
|
71
|
+
*/
|
|
72
|
+
quick(duration?: number): Promise<void>
|
|
43
73
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IDevice } from "../device.interface"
|
|
2
|
+
/**
|
|
3
|
+
* Interface representing the Smartboard Climbing SmartBoard Pro device, extending the base Device interface.
|
|
4
|
+
*/
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
6
|
+
export interface ISmartBoardPro extends IDevice {}
|
package/src/interfaces/index.ts
CHANGED
|
@@ -12,4 +12,6 @@ export type { ImySmartBoard } from "./device/mysmartboard.interface"
|
|
|
12
12
|
|
|
13
13
|
export type { IProgressor } from "./device/progressor.interface"
|
|
14
14
|
|
|
15
|
+
export type { ISmartBoardPro } from "./device/smartboard-pro.interface"
|
|
16
|
+
|
|
15
17
|
export type { IWHC06 } from "./device/wh-c06.interface"
|
|
@@ -157,11 +157,9 @@ export class Entralpi extends Device implements IEntralpi {
|
|
|
157
157
|
* and updates mass data including maximum and average values.
|
|
158
158
|
* It also handles command responses for retrieving device information.
|
|
159
159
|
*
|
|
160
|
-
* @param {
|
|
160
|
+
* @param {DataView} value - The notification event.
|
|
161
161
|
*/
|
|
162
|
-
override handleNotifications = (
|
|
163
|
-
const value: DataView | undefined = characteristic.value
|
|
164
|
-
|
|
162
|
+
override handleNotifications = (value: DataView): void => {
|
|
165
163
|
if (value) {
|
|
166
164
|
// Update timestamp
|
|
167
165
|
this.updateTimestamp()
|
|
@@ -108,13 +108,13 @@ export class ForceBoard extends Device implements IForceBoard {
|
|
|
108
108
|
uuid: "9a88d681-8df2-4afe-9e0d-c2bbbe773dd0",
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
|
-
name: "
|
|
111
|
+
name: "Force Data",
|
|
112
112
|
id: "rx",
|
|
113
113
|
uuid: "9a88d682-8df2-4afe-9e0d-c2bbbe773dd0",
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
|
-
name: "
|
|
117
|
-
id: "",
|
|
116
|
+
name: "Tare",
|
|
117
|
+
id: "tare",
|
|
118
118
|
uuid: "9a88d683-8df2-4afe-9e0d-c2bbbe773dd0",
|
|
119
119
|
},
|
|
120
120
|
{
|
|
@@ -123,8 +123,8 @@ export class ForceBoard extends Device implements IForceBoard {
|
|
|
123
123
|
uuid: "9a88d685-8df2-4afe-9e0d-c2bbbe773dd0",
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
|
-
name: "
|
|
127
|
-
id: "",
|
|
126
|
+
name: "Threshold",
|
|
127
|
+
id: "threshold",
|
|
128
128
|
uuid: "9a88d686-8df2-4afe-9e0d-c2bbbe773dd0",
|
|
129
129
|
},
|
|
130
130
|
{
|
|
@@ -145,12 +145,12 @@ export class ForceBoard extends Device implements IForceBoard {
|
|
|
145
145
|
],
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
|
-
name: "Weight
|
|
148
|
+
name: "Weight Service",
|
|
149
149
|
id: "weight",
|
|
150
150
|
uuid: "467a8516-6e39-11eb-9439-0242ac130002",
|
|
151
151
|
characteristics: [
|
|
152
152
|
{
|
|
153
|
-
name: "
|
|
153
|
+
name: "Device Mode",
|
|
154
154
|
id: "tx",
|
|
155
155
|
uuid: "467a8517-6e39-11eb-9439-0242ac130002",
|
|
156
156
|
},
|
|
@@ -163,7 +163,10 @@ export class ForceBoard extends Device implements IForceBoard {
|
|
|
163
163
|
},
|
|
164
164
|
],
|
|
165
165
|
commands: {
|
|
166
|
-
|
|
166
|
+
START_WEIGHT_MEAS: String.fromCharCode(0x04), // Streaming Data Mode: continuously streams force data.
|
|
167
|
+
TARE_SCALE: String.fromCharCode(0x05), // Tare function: zeroes out the current load value
|
|
168
|
+
START_QUICK_MEAS: String.fromCharCode(0x06), // Quick Start Mode: Starts data transmission when a force value exceeds the Threshold and stops data transmission when the force data drops below the Threshold.
|
|
169
|
+
STOP_WEIGHT_MEAS: String.fromCharCode(0x07), // Idle Mode: Force Board is idle.
|
|
167
170
|
},
|
|
168
171
|
})
|
|
169
172
|
}
|
|
@@ -181,53 +184,60 @@ export class ForceBoard extends Device implements IForceBoard {
|
|
|
181
184
|
* and updates mass data including maximum and average values.
|
|
182
185
|
* It also handles command responses for retrieving device information.
|
|
183
186
|
*
|
|
184
|
-
* @param {
|
|
187
|
+
* @param {DataView} value - The notification event.
|
|
185
188
|
*/
|
|
186
|
-
override handleNotifications = (
|
|
187
|
-
const value: DataView | undefined = characteristic.value
|
|
189
|
+
override handleNotifications = (value: DataView): void => {
|
|
188
190
|
if (value) {
|
|
189
191
|
// Update timestamp
|
|
190
192
|
this.updateTimestamp()
|
|
191
193
|
if (value.buffer) {
|
|
192
194
|
const receivedTime: number = Date.now()
|
|
193
195
|
const dataArray = new Uint8Array(value.buffer)
|
|
194
|
-
// Skip the first 2 bytes, which are the command and length
|
|
195
|
-
// The data is sent in groups of 3 bytes
|
|
196
|
-
for (let i = 2; i < dataArray.length; i += 3) {
|
|
197
|
-
const receivedData = (dataArray[i] << 16) | (dataArray[i + 1] << 8) | dataArray[i + 2]
|
|
198
|
-
// Convert from LBS to KG
|
|
199
|
-
const convertedReceivedData = receivedData * 0.453592
|
|
200
|
-
// Tare correction
|
|
201
|
-
const numericData = convertedReceivedData - this.applyTare(convertedReceivedData)
|
|
202
|
-
// Add data to downloadable Array
|
|
203
|
-
this.downloadPackets.push({
|
|
204
|
-
received: receivedTime,
|
|
205
|
-
sampleNum: this.dataPointCount,
|
|
206
|
-
battRaw: 0,
|
|
207
|
-
samples: [convertedReceivedData],
|
|
208
|
-
masses: [numericData],
|
|
209
|
-
})
|
|
210
196
|
|
|
211
|
-
|
|
212
|
-
|
|
197
|
+
// First two bytes contain the number of samples in the packet
|
|
198
|
+
const numSamples = (dataArray[0] << 8) | dataArray[1]
|
|
199
|
+
|
|
200
|
+
// Process each sample (3 bytes per sample)
|
|
201
|
+
for (let i = 0; i < numSamples; i++) {
|
|
202
|
+
const offset = 2 + i * 3 // Skip the first 2 bytes which indicate number of samples
|
|
203
|
+
if (offset + 2 < dataArray.length) {
|
|
204
|
+
// Sample = byte1*32768 + byte2*256 + byte3
|
|
205
|
+
const receivedData = dataArray[offset] * 32768 + dataArray[offset + 1] * 256 + dataArray[offset + 2]
|
|
206
|
+
|
|
207
|
+
// Convert from LBS to KG
|
|
208
|
+
const convertedReceivedData = receivedData * 0.453592
|
|
209
|
+
// Tare correction
|
|
210
|
+
const numericData = convertedReceivedData - this.applyTare(convertedReceivedData)
|
|
211
|
+
// Add data to downloadable Array
|
|
212
|
+
this.downloadPackets.push({
|
|
213
|
+
received: receivedTime,
|
|
214
|
+
sampleNum: this.dataPointCount,
|
|
215
|
+
battRaw: 0,
|
|
216
|
+
samples: [convertedReceivedData],
|
|
217
|
+
masses: [numericData],
|
|
218
|
+
})
|
|
213
219
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
this.massTotalSum += currentMassTotal
|
|
217
|
-
this.dataPointCount++
|
|
220
|
+
// Update massMax
|
|
221
|
+
this.massMax = Math.max(Number(this.massMax), numericData).toFixed(1)
|
|
218
222
|
|
|
219
|
-
|
|
220
|
-
|
|
223
|
+
// Update running sum and count
|
|
224
|
+
const currentMassTotal = Math.max(-1000, numericData)
|
|
225
|
+
this.massTotalSum += currentMassTotal
|
|
226
|
+
this.dataPointCount++
|
|
221
227
|
|
|
222
|
-
|
|
223
|
-
|
|
228
|
+
// Calculate the average dynamically
|
|
229
|
+
this.massAverage = (this.massTotalSum / this.dataPointCount).toFixed(1)
|
|
224
230
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
+
// Check if device is being used
|
|
232
|
+
this.activityCheck(numericData)
|
|
233
|
+
|
|
234
|
+
// Notify with weight data
|
|
235
|
+
this.notifyCallback({
|
|
236
|
+
massMax: this.massMax,
|
|
237
|
+
massAverage: this.massAverage,
|
|
238
|
+
massTotal: Math.max(-1000, numericData).toFixed(1),
|
|
239
|
+
})
|
|
240
|
+
}
|
|
231
241
|
}
|
|
232
242
|
}
|
|
233
243
|
}
|
|
@@ -250,7 +260,7 @@ export class ForceBoard extends Device implements IForceBoard {
|
|
|
250
260
|
}
|
|
251
261
|
|
|
252
262
|
/**
|
|
253
|
-
* Stops the data stream on the specified device.
|
|
263
|
+
* Stops the data stream on the specified device by setting it to Idle mode.
|
|
254
264
|
* @returns {Promise<void>} A promise that resolves when the stream is stopped.
|
|
255
265
|
*/
|
|
256
266
|
stop = async (): Promise<void> => {
|
|
@@ -258,26 +268,66 @@ export class ForceBoard extends Device implements IForceBoard {
|
|
|
258
268
|
}
|
|
259
269
|
|
|
260
270
|
/**
|
|
261
|
-
* Starts streaming data from the specified device.
|
|
271
|
+
* Starts streaming data from the specified device in Streaming Data Mode.
|
|
262
272
|
* @param {number} [duration=0] - The duration of the stream in milliseconds. If set to 0, stream will continue indefinitely.
|
|
263
273
|
* @returns {Promise<void>} A promise that resolves when the streaming operation is completed.
|
|
264
274
|
*/
|
|
265
275
|
stream = async (duration = 0): Promise<void> => {
|
|
266
|
-
//
|
|
267
|
-
this.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
276
|
+
// Start streaming data - Streaming Data Mode
|
|
277
|
+
await this.write("weight", "tx", this.commands.START_WEIGHT_MEAS, duration)
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Sets the threshold in Lbs for the Quick Start mode.
|
|
282
|
+
* @param {number} thresholdLbs - The threshold value in pounds.
|
|
283
|
+
* @returns {Promise<void>} A promise that resolves when the threshold is set.
|
|
284
|
+
*/
|
|
285
|
+
threshold = async (thresholdLbs: number): Promise<void> => {
|
|
286
|
+
const thresholdHex = thresholdLbs.toString(16).padStart(6, "0")
|
|
287
|
+
// 3-byte array from the hex string
|
|
288
|
+
const bytes = new Uint8Array(3)
|
|
289
|
+
bytes[0] = parseInt(thresholdHex.substring(0, 2), 16)
|
|
290
|
+
bytes[1] = parseInt(thresholdHex.substring(2, 4), 16)
|
|
291
|
+
bytes[2] = parseInt(thresholdHex.substring(4, 6), 16)
|
|
292
|
+
|
|
293
|
+
await this.write("forceboard", "threshold", String.fromCharCode(...bytes), 0)
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Tares the Force Board device using a characteristic to zero out the current load value.
|
|
298
|
+
* @returns {Promise<void>} A promise that resolves when the tare operation is completed.
|
|
299
|
+
*/
|
|
300
|
+
tareByCharacteristic = async (): Promise<void> => {
|
|
301
|
+
// Send tare command (0x01) to the tare characteristic
|
|
302
|
+
const tareValue = String.fromCharCode(0x01)
|
|
303
|
+
await this.write("forceboard", "tare", tareValue, 0)
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Initiates a tare routine via the Device Mode characteristic.
|
|
308
|
+
* Writes 0x05 to the Device Mode characteristic to zero out the current load value.
|
|
309
|
+
* @returns {Promise<void>} A promise that resolves when the tare operation is completed.
|
|
310
|
+
*/
|
|
311
|
+
tareByMode = async (): Promise<void> => {
|
|
312
|
+
await this.write("weight", "tx", this.commands.TARE_SCALE, 0)
|
|
274
313
|
}
|
|
275
314
|
|
|
276
315
|
/**
|
|
277
316
|
* Retrieves temperature information from the device.
|
|
278
|
-
* @returns {Promise<string>} A Promise that resolves with the
|
|
317
|
+
* @returns {Promise<string>} A Promise that resolves with the temperature information,
|
|
279
318
|
*/
|
|
280
319
|
temperature = async (): Promise<string | undefined> => {
|
|
281
320
|
return await this.read("temperature", "level", 250)
|
|
282
321
|
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Starts the Force Board in Quick Start mode.
|
|
325
|
+
* Writes 0x06 to the Device Mode characteristic.
|
|
326
|
+
* @param {number} [duration=0] - The duration in milliseconds. If set to 0, mode will continue indefinitely.
|
|
327
|
+
* @returns {Promise<void>} A promise that resolves when the operation is completed.
|
|
328
|
+
*/
|
|
329
|
+
quick = async (duration = 0): Promise<void> => {
|
|
330
|
+
// Start in Quick Start mode
|
|
331
|
+
await this.write("weight", "tx", this.commands.START_QUICK_MEAS, duration)
|
|
332
|
+
}
|
|
283
333
|
}
|
|
@@ -202,11 +202,9 @@ export class Motherboard extends Device implements IMotherboard {
|
|
|
202
202
|
* to extract samples, calibrate masses, and update running averages of mass data.
|
|
203
203
|
* If the received data is not a valid hex packet, it returns the unprocessed data.
|
|
204
204
|
*
|
|
205
|
-
* @param {
|
|
205
|
+
* @param {DataView} value - The notification event.
|
|
206
206
|
*/
|
|
207
|
-
override handleNotifications = (
|
|
208
|
-
const value: DataView | undefined = characteristic.value
|
|
209
|
-
|
|
207
|
+
override handleNotifications = (value: DataView): void => {
|
|
210
208
|
if (value) {
|
|
211
209
|
// Update timestamp
|
|
212
210
|
this.updateTimestamp()
|
|
@@ -121,11 +121,9 @@ export class Progressor extends Device implements IProgressor {
|
|
|
121
121
|
* and updates mass data including maximum and average values.
|
|
122
122
|
* It also handles command responses for retrieving device information.
|
|
123
123
|
*
|
|
124
|
-
* @param {
|
|
124
|
+
* @param {DataView} value - The notification event.
|
|
125
125
|
*/
|
|
126
|
-
override handleNotifications = (
|
|
127
|
-
const value: DataView | undefined = characteristic.value
|
|
128
|
-
|
|
126
|
+
override handleNotifications = (value: DataView): void => {
|
|
129
127
|
if (value) {
|
|
130
128
|
// Update timestamp
|
|
131
129
|
this.updateTimestamp()
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Device } from "../device.model"
|
|
2
|
+
import type { ISmartBoardPro } from "../../interfaces/device/smartboard-pro.interface"
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Represents a Smartboard Climbing SmartBoard Pro device.
|
|
6
|
+
* TODO: Figure out services, do you own a SmartBoard Pro? Help us!
|
|
7
|
+
* {@link https://www.smartboard-climbing.com}
|
|
8
|
+
*/
|
|
9
|
+
export class SmartBoardPro extends Device implements ISmartBoardPro {
|
|
10
|
+
constructor() {
|
|
11
|
+
super({
|
|
12
|
+
filters: [{ name: "SMARTBOARD" }],
|
|
13
|
+
services: [
|
|
14
|
+
{
|
|
15
|
+
name: "Basic Audio Announcement",
|
|
16
|
+
id: "audio",
|
|
17
|
+
uuid: "00001851-0000-1000-8000-00805f9b34fb",
|
|
18
|
+
characteristics: [
|
|
19
|
+
{
|
|
20
|
+
name: "",
|
|
21
|
+
id: "",
|
|
22
|
+
uuid: "0000937d-0000-1000-8000-00805f9b34fb",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "Read + Notify",
|
|
28
|
+
id: "",
|
|
29
|
+
uuid: "0000403d-0000-1000-8000-00805f9b34fb",
|
|
30
|
+
characteristics: [
|
|
31
|
+
{
|
|
32
|
+
name: "",
|
|
33
|
+
id: "",
|
|
34
|
+
uuid: "00001583-0000-1000-8000-00805f9b34fb",
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "Generic Attribute",
|
|
40
|
+
id: "attribute",
|
|
41
|
+
uuid: "00001801-0000-1000-8000-00805f9b34fb",
|
|
42
|
+
characteristics: [
|
|
43
|
+
{
|
|
44
|
+
name: "Service Changed",
|
|
45
|
+
id: "service",
|
|
46
|
+
uuid: "00002a05-0000-1000-8000-00805f9b34fb",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
}
|