@hangtime/grip-connect 0.8.3 → 0.8.5

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.
Files changed (117) hide show
  1. package/deno.json +1 -1
  2. package/package.json +22 -3
  3. package/src/models/base.model.ts +15 -5
  4. package/src/models/device.model.ts +5 -2
  5. package/tsconfig.cjs.json +15 -0
  6. package/dist/index.d.ts +0 -3
  7. package/dist/index.d.ts.map +0 -1
  8. package/dist/index.js +0 -2
  9. package/dist/index.js.map +0 -1
  10. package/dist/interfaces/base.interface.d.ts +0 -18
  11. package/dist/interfaces/base.interface.d.ts.map +0 -1
  12. package/dist/interfaces/base.interface.js +0 -2
  13. package/dist/interfaces/base.interface.js.map +0 -1
  14. package/dist/interfaces/callback.interface.d.ts +0 -56
  15. package/dist/interfaces/callback.interface.d.ts.map +0 -1
  16. package/dist/interfaces/callback.interface.js +0 -2
  17. package/dist/interfaces/callback.interface.js.map +0 -1
  18. package/dist/interfaces/command.interface.d.ts +0 -92
  19. package/dist/interfaces/command.interface.d.ts.map +0 -1
  20. package/dist/interfaces/command.interface.js +0 -2
  21. package/dist/interfaces/command.interface.js.map +0 -1
  22. package/dist/interfaces/device/climbro.interface.d.ts +0 -7
  23. package/dist/interfaces/device/climbro.interface.d.ts.map +0 -1
  24. package/dist/interfaces/device/climbro.interface.js +0 -2
  25. package/dist/interfaces/device/climbro.interface.js.map +0 -1
  26. package/dist/interfaces/device/entralpi.interface.d.ts +0 -53
  27. package/dist/interfaces/device/entralpi.interface.d.ts.map +0 -1
  28. package/dist/interfaces/device/entralpi.interface.js +0 -2
  29. package/dist/interfaces/device/entralpi.interface.js.map +0 -1
  30. package/dist/interfaces/device/forceboard.interface.d.ts +0 -64
  31. package/dist/interfaces/device/forceboard.interface.d.ts.map +0 -1
  32. package/dist/interfaces/device/forceboard.interface.js +0 -2
  33. package/dist/interfaces/device/forceboard.interface.js.map +0 -1
  34. package/dist/interfaces/device/kilterboard.interface.d.ts +0 -16
  35. package/dist/interfaces/device/kilterboard.interface.d.ts.map +0 -1
  36. package/dist/interfaces/device/kilterboard.interface.js +0 -2
  37. package/dist/interfaces/device/kilterboard.interface.js.map +0 -1
  38. package/dist/interfaces/device/motherboard.interface.d.ts +0 -54
  39. package/dist/interfaces/device/motherboard.interface.d.ts.map +0 -1
  40. package/dist/interfaces/device/motherboard.interface.js +0 -2
  41. package/dist/interfaces/device/motherboard.interface.js.map +0 -1
  42. package/dist/interfaces/device/mysmartboard.interface.d.ts +0 -7
  43. package/dist/interfaces/device/mysmartboard.interface.d.ts.map +0 -1
  44. package/dist/interfaces/device/mysmartboard.interface.js +0 -2
  45. package/dist/interfaces/device/mysmartboard.interface.js.map +0 -1
  46. package/dist/interfaces/device/progressor.interface.d.ts +0 -28
  47. package/dist/interfaces/device/progressor.interface.d.ts.map +0 -1
  48. package/dist/interfaces/device/progressor.interface.js +0 -2
  49. package/dist/interfaces/device/progressor.interface.js.map +0 -1
  50. package/dist/interfaces/device/smartboard-pro.interface.d.ts +0 -7
  51. package/dist/interfaces/device/smartboard-pro.interface.d.ts.map +0 -1
  52. package/dist/interfaces/device/smartboard-pro.interface.js +0 -2
  53. package/dist/interfaces/device/smartboard-pro.interface.js.map +0 -1
  54. package/dist/interfaces/device/wh-c06.interface.d.ts +0 -7
  55. package/dist/interfaces/device/wh-c06.interface.d.ts.map +0 -1
  56. package/dist/interfaces/device/wh-c06.interface.js +0 -2
  57. package/dist/interfaces/device/wh-c06.interface.js.map +0 -1
  58. package/dist/interfaces/device.interface.d.ts +0 -203
  59. package/dist/interfaces/device.interface.d.ts.map +0 -1
  60. package/dist/interfaces/device.interface.js +0 -2
  61. package/dist/interfaces/device.interface.js.map +0 -1
  62. package/dist/interfaces/download.interface.d.ts +0 -16
  63. package/dist/interfaces/download.interface.d.ts.map +0 -1
  64. package/dist/interfaces/download.interface.js +0 -2
  65. package/dist/interfaces/download.interface.js.map +0 -1
  66. package/dist/interfaces/index.d.ts +0 -10
  67. package/dist/interfaces/index.d.ts.map +0 -1
  68. package/dist/interfaces/index.js +0 -2
  69. package/dist/interfaces/index.js.map +0 -1
  70. package/dist/models/base.model.d.ts +0 -8
  71. package/dist/models/base.model.d.ts.map +0 -1
  72. package/dist/models/base.model.js +0 -11
  73. package/dist/models/base.model.js.map +0 -1
  74. package/dist/models/device/climbro.model.d.ts +0 -11
  75. package/dist/models/device/climbro.model.d.ts.map +0 -1
  76. package/dist/models/device/climbro.model.js +0 -15
  77. package/dist/models/device/climbro.model.js.map +0 -1
  78. package/dist/models/device/entralpi.model.d.ts +0 -64
  79. package/dist/models/device/entralpi.model.d.ts.map +0 -1
  80. package/dist/models/device/entralpi.model.js +0 -240
  81. package/dist/models/device/entralpi.model.js.map +0 -1
  82. package/dist/models/device/forceboard.model.d.ts +0 -73
  83. package/dist/models/device/forceboard.model.d.ts.map +0 -1
  84. package/dist/models/device/forceboard.model.js +0 -312
  85. package/dist/models/device/forceboard.model.js.map +0 -1
  86. package/dist/models/device/kilterboard.model.d.ts +0 -144
  87. package/dist/models/device/kilterboard.model.d.ts.map +0 -1
  88. package/dist/models/device/kilterboard.model.js +0 -287
  89. package/dist/models/device/kilterboard.model.js.map +0 -1
  90. package/dist/models/device/motherboard.model.d.ts +0 -110
  91. package/dist/models/device/motherboard.model.d.ts.map +0 -1
  92. package/dist/models/device/motherboard.model.js +0 -378
  93. package/dist/models/device/motherboard.model.js.map +0 -1
  94. package/dist/models/device/mysmartboard.model.d.ts +0 -11
  95. package/dist/models/device/mysmartboard.model.d.ts.map +0 -1
  96. package/dist/models/device/mysmartboard.model.js +0 -15
  97. package/dist/models/device/mysmartboard.model.js.map +0 -1
  98. package/dist/models/device/progressor.model.d.ts +0 -39
  99. package/dist/models/device/progressor.model.d.ts.map +0 -1
  100. package/dist/models/device/progressor.model.js +0 -216
  101. package/dist/models/device/progressor.model.js.map +0 -1
  102. package/dist/models/device/smartboard-pro.model.d.ts +0 -11
  103. package/dist/models/device/smartboard-pro.model.d.ts.map +0 -1
  104. package/dist/models/device/smartboard-pro.model.js +0 -52
  105. package/dist/models/device/smartboard-pro.model.js.map +0 -1
  106. package/dist/models/device/wh-c06.model.d.ts +0 -57
  107. package/dist/models/device/wh-c06.model.d.ts.map +0 -1
  108. package/dist/models/device/wh-c06.model.js +0 -167
  109. package/dist/models/device/wh-c06.model.js.map +0 -1
  110. package/dist/models/device.model.d.ts +0 -408
  111. package/dist/models/device.model.d.ts.map +0 -1
  112. package/dist/models/device.model.js +0 -718
  113. package/dist/models/device.model.js.map +0 -1
  114. package/dist/models/index.d.ts +0 -10
  115. package/dist/models/index.d.ts.map +0 -1
  116. package/dist/models/index.js +0 -10
  117. package/dist/models/index.js.map +0 -1
@@ -1,216 +0,0 @@
1
- import { Device } from "../device.model.js";
2
- /**
3
- * Progressor responses
4
- */
5
- var ProgressorResponses;
6
- (function (ProgressorResponses) {
7
- /**
8
- * Response received after sending a command to the device.
9
- * This could include acknowledgment or specific data related to the command sent.
10
- */
11
- ProgressorResponses[ProgressorResponses["COMMAND_RESPONSE"] = 0] = "COMMAND_RESPONSE";
12
- /**
13
- * Data representing a weight measurement from the device.
14
- * Typically used for tracking load or force applied.
15
- */
16
- ProgressorResponses[ProgressorResponses["WEIGHT_MEASURE"] = 1] = "WEIGHT_MEASURE";
17
- /**
18
- * Peak rate of force development (RFD) measurement.
19
- * This measures how quickly the force is applied over time.
20
- */
21
- ProgressorResponses[ProgressorResponses["PEAK_RFD_MEAS"] = 2] = "PEAK_RFD_MEAS";
22
- /**
23
- * Series of peak rate of force development (RFD) measurements.
24
- * This could be used for analyzing force trends over multiple data points.
25
- */
26
- ProgressorResponses[ProgressorResponses["PEAK_RFD_MEAS_SERIES"] = 3] = "PEAK_RFD_MEAS_SERIES";
27
- /**
28
- * Low battery warning from the device.
29
- * Indicates that the battery level is below a critical threshold.
30
- */
31
- ProgressorResponses[ProgressorResponses["LOW_BATTERY_WARNING"] = 4] = "LOW_BATTERY_WARNING";
32
- })(ProgressorResponses || (ProgressorResponses = {}));
33
- /**
34
- * Represents a Tindeq Progressor device.
35
- * {@link https://tindeq.com}
36
- */
37
- export class Progressor extends Device {
38
- constructor() {
39
- super({
40
- filters: [{ namePrefix: "Progressor" }],
41
- services: [
42
- {
43
- name: "Progressor Service",
44
- id: "progressor",
45
- uuid: "7e4e1701-1ea6-40c9-9dcc-13d34ffead57",
46
- characteristics: [
47
- {
48
- name: "Notify",
49
- id: "rx",
50
- uuid: "7e4e1702-1ea6-40c9-9dcc-13d34ffead57",
51
- },
52
- {
53
- name: "Write",
54
- id: "tx",
55
- uuid: "7e4e1703-1ea6-40c9-9dcc-13d34ffead57",
56
- },
57
- ],
58
- },
59
- {
60
- name: "Nordic Device Firmware Update (DFU) Service",
61
- id: "dfu",
62
- uuid: "0000fe59-0000-1000-8000-00805f9b34fb",
63
- characteristics: [
64
- {
65
- name: "Buttonless DFU",
66
- id: "dfu",
67
- uuid: "8ec90003-f315-4f60-9fb8-838830daea50",
68
- },
69
- ],
70
- },
71
- ],
72
- commands: {
73
- TARE_SCALE: "d", // 0x64
74
- START_WEIGHT_MEAS: "e", // 0x65
75
- STOP_WEIGHT_MEAS: "f", // 0x66
76
- START_PEAK_RFD_MEAS: "g", // 0x67
77
- START_PEAK_RFD_MEAS_SERIES: "h", // 0x68
78
- ADD_CALIB_POINT: "i", // 0x69
79
- SAVE_CALIB: "j", // 0x6a
80
- GET_FW_VERSION: "k", // 0x6b
81
- GET_ERR_INFO: "l", // 0x6c
82
- CLR_ERR_INFO: "m", // 0x6d
83
- SLEEP: "n", // 0x6e
84
- GET_BATT_VLTG: "o", // 0x6f
85
- },
86
- });
87
- }
88
- /**
89
- * Retrieves battery or voltage information from the device.
90
- * @returns {Promise<string | undefined>} A Promise that resolves with the battery or voltage information,
91
- */
92
- battery = async () => {
93
- let response = undefined;
94
- await this.write("progressor", "tx", this.commands.GET_BATT_VLTG, 250, (data) => {
95
- response = data;
96
- });
97
- return response;
98
- };
99
- /**
100
- * Retrieves firmware version from the device.
101
- * @returns {Promise<string>} A Promise that resolves with the firmware version,
102
- */
103
- firmware = async () => {
104
- let response = undefined;
105
- await this.write("progressor", "tx", this.commands.GET_FW_VERSION, 250, (data) => {
106
- response = data;
107
- });
108
- return response;
109
- };
110
- /**
111
- * Handles data received from the device, processes weight measurements,
112
- * and updates mass data including maximum and average values.
113
- * It also handles command responses for retrieving device information.
114
- *
115
- * @param {DataView} value - The notification event.
116
- */
117
- handleNotifications = (value) => {
118
- if (value) {
119
- // Update timestamp
120
- this.updateTimestamp();
121
- if (value.buffer) {
122
- const receivedTime = Date.now();
123
- // Read the first byte of the buffer to determine the kind of message
124
- const kind = value.getInt8(0);
125
- // Check if the message is a weight measurement
126
- if (kind === ProgressorResponses.WEIGHT_MEASURE) {
127
- // Start parsing data from the 3rd byte (index 2)
128
- let offset = 2;
129
- // Continue parsing while there's data left in the buffer
130
- while (offset < value.byteLength) {
131
- // Read a 32-bit float (4 bytes) for the weight, using little-endian
132
- const weight = value.getFloat32(offset, true);
133
- // Move the offset by 4 bytes
134
- offset += 4;
135
- // Read a 32-bit integer (4 bytes) for the seconds, using little-endian
136
- const seconds = value.getInt32(offset, true);
137
- // Move the offset by 4 bytes
138
- offset += 4;
139
- // Check if both weight and seconds are valid numbers
140
- if (!isNaN(weight) && !isNaN(seconds)) {
141
- // Tare correction
142
- const numericData = weight - this.applyTare(weight);
143
- // Add data to downloadable Array
144
- this.downloadPackets.push({
145
- received: receivedTime,
146
- sampleNum: seconds,
147
- battRaw: 0,
148
- samples: [weight],
149
- masses: [numericData],
150
- });
151
- // Check for max weight
152
- this.massMax = Math.max(Number(this.massMax), Number(numericData)).toFixed(1);
153
- // Update running sum and count
154
- const currentMassTotal = Math.max(-1000, Number(numericData));
155
- this.massTotalSum += currentMassTotal;
156
- this.dataPointCount++;
157
- // Calculate the average dynamically
158
- this.massAverage = (this.massTotalSum / this.dataPointCount).toFixed(1);
159
- // Check if device is being used
160
- this.activityCheck(numericData);
161
- this.notifyCallback({
162
- massMax: this.massMax,
163
- massAverage: this.massAverage,
164
- massTotal: Math.max(-1000, numericData).toFixed(1),
165
- });
166
- }
167
- }
168
- }
169
- else if (kind === ProgressorResponses.COMMAND_RESPONSE) {
170
- if (!this.writeLast)
171
- return;
172
- let output = "";
173
- if (this.writeLast === this.commands.GET_BATT_VLTG) {
174
- output = new DataView(value.buffer, 2).getUint32(0, true).toString();
175
- }
176
- else if (this.writeLast === this.commands.GET_FW_VERSION) {
177
- output = new TextDecoder().decode(new Uint8Array(value.buffer).slice(2));
178
- }
179
- else if (this.writeLast === this.commands.GET_ERR_INFO) {
180
- output = new TextDecoder().decode(new Uint8Array(value.buffer.slice(2)));
181
- }
182
- this.writeCallback(output);
183
- }
184
- else if (kind === ProgressorResponses.LOW_BATTERY_WARNING) {
185
- console.warn("⚠️ Low power detected. Please consider connecting to a power source.");
186
- }
187
- else {
188
- throw new Error(`Unknown message kind detected: ${kind}`);
189
- }
190
- }
191
- }
192
- };
193
- /**
194
- * Stops the data stream on the specified device.
195
- * @returns {Promise<void>} A promise that resolves when the stream is stopped.
196
- */
197
- stop = async () => {
198
- await this.write("progressor", "tx", this.commands.STOP_WEIGHT_MEAS, 0);
199
- };
200
- /**
201
- * Starts streaming data from the specified device.
202
- * @param {number} [duration=0] - The duration of the stream in milliseconds. If set to 0, stream will continue indefinitely.
203
- * @returns {Promise<void>} A promise that resolves when the streaming operation is completed.
204
- */
205
- stream = async (duration = 0) => {
206
- // Reset download packets
207
- this.downloadPackets.length = 0;
208
- // Start streaming data
209
- await this.write("progressor", "tx", this.commands.START_WEIGHT_MEAS, duration);
210
- // Stop streaming if duration is set
211
- if (duration !== 0) {
212
- await this.stop();
213
- }
214
- };
215
- }
216
- //# sourceMappingURL=progressor.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"progressor.model.js","sourceRoot":"","sources":["../../../src/models/device/progressor.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;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IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;oBAC1E,CAAC;oBACD,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;gBAC5B,CAAC;qBAAM,IAAI,IAAI,KAAK,mBAAmB,CAAC,mBAAmB,EAAE,CAAC;oBAC5D,OAAO,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAA;gBACtF,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,KAAK,CAAC,kCAAkC,IAAI,EAAE,CAAC,CAAA;gBAC3D,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAA;IAED;;;OAGG;IACH,IAAI,GAAG,KAAK,IAAmB,EAAE;QAC/B,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAA;IACzE,CAAC,CAAA;IAED;;;;OAIG;IACH,MAAM,GAAG,KAAK,EAAE,QAAQ,GAAG,CAAC,EAAiB,EAAE;QAC7C,yBAAyB;QACzB,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAA;QAC/B,uBAAuB;QACvB,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAA;QAC/E,oCAAoC;QACpC,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;YACnB,MAAM,IAAI,CAAC,IAAI,EAAE,CAAA;QACnB,CAAC;IACH,CAAC,CAAA;CACF"}
@@ -1,11 +0,0 @@
1
- import { Device } from "../device.model.js";
2
- import type { ISmartBoardPro } from "../../interfaces/device/smartboard-pro.interface.js";
3
- /**
4
- * Represents a Smartboard Climbing SmartBoard Pro device.
5
- * TODO: Figure out services, do you own a SmartBoard Pro? Help us!
6
- * {@link https://www.smartboard-climbing.com}
7
- */
8
- export declare class SmartBoardPro extends Device implements ISmartBoardPro {
9
- constructor();
10
- }
11
- //# sourceMappingURL=smartboard-pro.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"smartboard-pro.model.d.ts","sourceRoot":"","sources":["../../../src/models/device/smartboard-pro.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAA;AAEzF;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,MAAO,YAAW,cAAc;;CA4ClE"}
@@ -1,52 +0,0 @@
1
- import { Device } from "../device.model.js";
2
- /**
3
- * Represents a Smartboard Climbing SmartBoard Pro device.
4
- * TODO: Figure out services, do you own a SmartBoard Pro? Help us!
5
- * {@link https://www.smartboard-climbing.com}
6
- */
7
- export class SmartBoardPro extends Device {
8
- constructor() {
9
- super({
10
- filters: [{ name: "SMARTBOARD" }],
11
- services: [
12
- {
13
- name: "Basic Audio Announcement",
14
- id: "audio",
15
- uuid: "00001851-0000-1000-8000-00805f9b34fb",
16
- characteristics: [
17
- {
18
- name: "",
19
- id: "",
20
- uuid: "0000937d-0000-1000-8000-00805f9b34fb",
21
- },
22
- ],
23
- },
24
- {
25
- name: "Read + Notify",
26
- id: "",
27
- uuid: "0000403d-0000-1000-8000-00805f9b34fb",
28
- characteristics: [
29
- {
30
- name: "",
31
- id: "",
32
- uuid: "00001583-0000-1000-8000-00805f9b34fb",
33
- },
34
- ],
35
- },
36
- {
37
- name: "Generic Attribute",
38
- id: "attribute",
39
- uuid: "00001801-0000-1000-8000-00805f9b34fb",
40
- characteristics: [
41
- {
42
- name: "Service Changed",
43
- id: "service",
44
- uuid: "00002a05-0000-1000-8000-00805f9b34fb",
45
- },
46
- ],
47
- },
48
- ],
49
- });
50
- }
51
- }
52
- //# sourceMappingURL=smartboard-pro.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"smartboard-pro.model.js","sourceRoot":"","sources":["../../../src/models/device/smartboard-pro.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAG3C;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,MAAM;IACvC;QACE,KAAK,CAAC;YACJ,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;YACjC,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,0BAA0B;oBAChC,EAAE,EAAE,OAAO;oBACX,IAAI,EAAE,sCAAsC;oBAC5C,eAAe,EAAE;wBACf;4BACE,IAAI,EAAE,EAAE;4BACR,EAAE,EAAE,EAAE;4BACN,IAAI,EAAE,sCAAsC;yBAC7C;qBACF;iBACF;gBACD;oBACE,IAAI,EAAE,eAAe;oBACrB,EAAE,EAAE,EAAE;oBACN,IAAI,EAAE,sCAAsC;oBAC5C,eAAe,EAAE;wBACf;4BACE,IAAI,EAAE,EAAE;4BACR,EAAE,EAAE,EAAE;4BACN,IAAI,EAAE,sCAAsC;yBAC7C;qBACF;iBACF;gBACD;oBACE,IAAI,EAAE,mBAAmB;oBACzB,EAAE,EAAE,WAAW;oBACf,IAAI,EAAE,sCAAsC;oBAC5C,eAAe,EAAE;wBACf;4BACE,IAAI,EAAE,iBAAiB;4BACvB,EAAE,EAAE,SAAS;4BACb,IAAI,EAAE,sCAAsC;yBAC7C;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -1,57 +0,0 @@
1
- import { Device } from "../device.model.js";
2
- import type { IWHC06 } from "../../interfaces/device/wh-c06.interface.js";
3
- /**
4
- * Represents a Weiheng - WH-C06 (or MAT Muscle Meter) device.
5
- * To use this device enable: `chrome://flags/#enable-experimental-web-platform-features`.
6
- * {@link https://googlechrome.github.io/samples/web-bluetooth/scan.html| Web Bluetooth}
7
- * {@link https://weihengmanufacturer.com}
8
- */
9
- export declare class WHC06 extends Device implements IWHC06 {
10
- /**
11
- * Offset for the byte location in the manufacturer data to extract the weight.
12
- * @type {number}
13
- * @static
14
- * @readonly
15
- * @constant
16
- */
17
- private static readonly weightOffset;
18
- /**
19
- * Company identifier for WH-C06, also used by 'TomTom International BV': https://www.bluetooth.com/specifications/assigned-numbers/
20
- * @type {number}
21
- * @static
22
- * @readonly
23
- * @constant
24
- */
25
- private static readonly manufacturerId;
26
- /**
27
- * To track disconnection timeout.
28
- * @type {number|null}
29
- * @private
30
- */
31
- private advertisementTimeout;
32
- /**
33
- * The limit in seconds when timeout is triggered
34
- * @type {number}
35
- * @private
36
- * @readonly
37
- */
38
- private readonly advertisementTimeoutTime;
39
- constructor();
40
- /**
41
- * Connects to a Bluetooth device.
42
- * @param {Function} [onSuccess] - Optional callback function to execute on successful connection. Default logs success.
43
- * @param {Function} [onError] - Optional callback function to execute on error. Default logs the error.
44
- */
45
- connect: (onSuccess?: () => void, onError?: (error: Error) => void) => Promise<void>;
46
- /**
47
- * Custom check if a Bluetooth device is connected.
48
- * For the WH-C06 device, the `gatt.connected` property remains `false` even after the device is connected.
49
- * @returns {boolean} A boolean indicating whether the device is connected.
50
- */
51
- isConnected: () => boolean;
52
- /**
53
- * Resets the timeout that checks if the device is still advertising.
54
- */
55
- private resetAdvertisementTimeout;
56
- }
57
- //# sourceMappingURL=wh-c06.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wh-c06.model.d.ts","sourceRoot":"","sources":["../../../src/models/device/wh-c06.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAA;AAEzE;;;;;GAKG;AACH,qBAAa,KAAM,SAAQ,MAAO,YAAW,MAAM;IACjD;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAa;IAEjD;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAc;IAEpD;;;;OAIG;IACH,OAAO,CAAC,oBAAoB,CAA6C;IAEzE;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAa;;IA0BtD;;;;OAIG;IACM,OAAO,GACd,YAAW,MAAM,IAAkD,EACnE,UAAS,CAAC,KAAK,EAAE,KAAK,KAAK,IAAsC,KAChE,OAAO,CAAC,IAAI,CAAC,CAqFf;IAED;;;;OAIG;IACM,WAAW,QAAO,OAAO,CAEjC;IAED;;OAEG;IACH,OAAO,CAAC,yBAAyB,CAkBhC;CACF"}
@@ -1,167 +0,0 @@
1
- import { Device } from "../device.model.js";
2
- /**
3
- * Represents a Weiheng - WH-C06 (or MAT Muscle Meter) device.
4
- * To use this device enable: `chrome://flags/#enable-experimental-web-platform-features`.
5
- * {@link https://googlechrome.github.io/samples/web-bluetooth/scan.html| Web Bluetooth}
6
- * {@link https://weihengmanufacturer.com}
7
- */
8
- export class WHC06 extends Device {
9
- /**
10
- * Offset for the byte location in the manufacturer data to extract the weight.
11
- * @type {number}
12
- * @static
13
- * @readonly
14
- * @constant
15
- */
16
- static weightOffset = 10;
17
- /**
18
- * Company identifier for WH-C06, also used by 'TomTom International BV': https://www.bluetooth.com/specifications/assigned-numbers/
19
- * @type {number}
20
- * @static
21
- * @readonly
22
- * @constant
23
- */
24
- static manufacturerId = 256;
25
- /**
26
- * To track disconnection timeout.
27
- * @type {number|null}
28
- * @private
29
- */
30
- advertisementTimeout = null;
31
- /**
32
- * The limit in seconds when timeout is triggered
33
- * @type {number}
34
- * @private
35
- * @readonly
36
- */
37
- advertisementTimeoutTime = 10;
38
- // /**
39
- // * Offset for the byte location in the manufacturer data to determine weight stability.
40
- // * @type {number}
41
- // * @static
42
- // * @readonly
43
- // * @constant
44
- // */
45
- // private static readonly stableOffset: number = 14
46
- constructor() {
47
- super({
48
- filters: [
49
- {
50
- // name: "IF_B7",
51
- manufacturerData: [
52
- {
53
- companyIdentifier: 0x0100, // 256
54
- },
55
- ],
56
- },
57
- ],
58
- services: [],
59
- });
60
- }
61
- /**
62
- * Connects to a Bluetooth device.
63
- * @param {Function} [onSuccess] - Optional callback function to execute on successful connection. Default logs success.
64
- * @param {Function} [onError] - Optional callback function to execute on error. Default logs the error.
65
- */
66
- connect = async (onSuccess = () => console.log("Connected successfully"), onError = (error) => console.error(error)) => {
67
- try {
68
- // Only data matching the optionalManufacturerData parameter to requestDevice is included in the advertisement event: https://github.com/WebBluetoothCG/web-bluetooth/issues/598
69
- const optionalManufacturerData = this.filters.flatMap((filter) => filter.manufacturerData?.map((data) => data.companyIdentifier) || []);
70
- const bluetooth = await this.getBluetooth();
71
- this.bluetooth = await bluetooth.requestDevice({
72
- filters: this.filters,
73
- optionalManufacturerData,
74
- });
75
- if (!this.bluetooth.gatt) {
76
- throw new Error("GATT is not available on this device");
77
- }
78
- // Update timestamp
79
- this.updateTimestamp();
80
- // Device has no services / characteristics, so we directly call onSuccess
81
- onSuccess();
82
- this.bluetooth.addEventListener("advertisementreceived", (event) => {
83
- const data = event.manufacturerData.get(WHC06.manufacturerId);
84
- if (data) {
85
- // Handle recieved data
86
- const weight = (data.getUint8(WHC06.weightOffset) << 8) | data.getUint8(WHC06.weightOffset + 1);
87
- // const stable = (data.getUint8(STABLE_OFFSET) & 0xf0) >> 4
88
- // const unit = data.getUint8(STABLE_OFFSET) & 0x0f
89
- const receivedTime = Date.now();
90
- const receivedData = weight / 100;
91
- const numericData = receivedData - this.applyTare(receivedData) * -1;
92
- // Add data to downloadable Array
93
- this.downloadPackets.push({
94
- received: receivedTime,
95
- sampleNum: this.dataPointCount,
96
- battRaw: 0,
97
- samples: [numericData],
98
- masses: [numericData],
99
- });
100
- // Update massMax
101
- this.massMax = Math.max(Number(this.massMax), numericData).toFixed(1);
102
- // Update running sum and count
103
- const currentMassTotal = Math.max(-1000, numericData);
104
- this.massTotalSum += currentMassTotal;
105
- this.dataPointCount++;
106
- // Calculate the average dynamically
107
- this.massAverage = (this.massTotalSum / this.dataPointCount).toFixed(1);
108
- // Check if device is being used
109
- this.activityCheck(numericData);
110
- // Notify with weight data
111
- this.notifyCallback({
112
- massMax: this.massMax,
113
- massAverage: this.massAverage,
114
- massTotal: Math.max(-1000, numericData).toFixed(1),
115
- });
116
- }
117
- // Reset "still advertising" counter
118
- this.resetAdvertisementTimeout();
119
- });
120
- // When the companyIdentifier is provided we want to get manufacturerData using watchAdvertisements.
121
- if (optionalManufacturerData.length) {
122
- // Receive events when the system receives an advertisement packet from a watched device.
123
- // To use this function in Chrome: chrome://flags/#enable-experimental-web-platform-features has to be enabled.
124
- // More info: https://chromestatus.com/feature/5180688812736512
125
- if (typeof this.bluetooth.watchAdvertisements === "function") {
126
- await this.bluetooth.watchAdvertisements();
127
- }
128
- else {
129
- throw new Error("watchAdvertisements isn't supported. For Chrome, enable it at chrome://flags/#enable-experimental-web-platform-features.");
130
- }
131
- }
132
- }
133
- catch (error) {
134
- onError(error);
135
- }
136
- };
137
- /**
138
- * Custom check if a Bluetooth device is connected.
139
- * For the WH-C06 device, the `gatt.connected` property remains `false` even after the device is connected.
140
- * @returns {boolean} A boolean indicating whether the device is connected.
141
- */
142
- isConnected = () => {
143
- return !!this.bluetooth;
144
- };
145
- /**
146
- * Resets the timeout that checks if the device is still advertising.
147
- */
148
- resetAdvertisementTimeout = () => {
149
- // Clear the previous timeout
150
- if (this.advertisementTimeout) {
151
- clearTimeout(this.advertisementTimeout);
152
- }
153
- // Set a new timeout to stop tracking if no advertisement is received
154
- this.advertisementTimeout = globalThis.setTimeout(() => {
155
- // Mimic a disconnect
156
- const disconnectedEvent = new Event("gattserverdisconnected");
157
- Object.defineProperty(disconnectedEvent, "target", {
158
- value: this.bluetooth,
159
- writable: false,
160
- });
161
- // Print error to the console
162
- console.error(`No advertisement received for ${this.advertisementTimeoutTime} seconds, stopping tracking..`);
163
- this.onDisconnected(disconnectedEvent);
164
- }, this.advertisementTimeoutTime * 1000); // 10 seconds
165
- };
166
- }
167
- //# sourceMappingURL=wh-c06.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wh-c06.model.js","sourceRoot":"","sources":["../../../src/models/device/wh-c06.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAG3C;;;;;GAKG;AACH,MAAM,OAAO,KAAM,SAAQ,MAAM;IAC/B;;;;;;OAMG;IACK,MAAM,CAAU,YAAY,GAAW,EAAE,CAAA;IAEjD;;;;;;OAMG;IACK,MAAM,CAAU,cAAc,GAAW,GAAG,CAAA;IAEpD;;;;OAIG;IACK,oBAAoB,GAAyC,IAAI,CAAA;IAEzE;;;;;OAKG;IACc,wBAAwB,GAAW,EAAE,CAAA;IAEtD,MAAM;IACN,0FAA0F;IAC1F,oBAAoB;IACpB,aAAa;IACb,eAAe;IACf,eAAe;IACf,MAAM;IACN,oDAAoD;IACpD;QACE,KAAK,CAAC;YACJ,OAAO,EAAE;gBACP;oBACE,iBAAiB;oBACjB,gBAAgB,EAAE;wBAChB;4BACE,iBAAiB,EAAE,MAAM,EAAE,MAAM;yBAClC;qBACF;iBACF;aACF;YACD,QAAQ,EAAE,EAAE;SACb,CAAC,CAAA;IACJ,CAAC;IAED;;;;OAIG;IACM,OAAO,GAAG,KAAK,EACtB,YAAwB,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,EACnE,UAAkC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAClD,EAAE;QACjB,IAAI,CAAC;YACH,gLAAgL;YAChL,MAAM,wBAAwB,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CACnD,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CACjF,CAAA;YAED,MAAM,SAAS,GAAG,MAA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