@hangtime/grip-connect 0.12.0 → 0.13.1
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 +20 -9
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/command.interface.d.ts +110 -21
- package/dist/cjs/interfaces/command.interface.d.ts.map +1 -1
- package/dist/cjs/interfaces/device/aurora.interface.d.ts +17 -0
- package/dist/cjs/interfaces/device/aurora.interface.d.ts.map +1 -0
- package/dist/cjs/interfaces/device/{kilterboard.interface.js → aurora.interface.js} +1 -1
- package/dist/cjs/interfaces/device/aurora.interface.js.map +1 -0
- package/dist/cjs/interfaces/device/cts500.interface.d.ts +96 -0
- package/dist/cjs/interfaces/device/cts500.interface.d.ts.map +1 -0
- package/dist/cjs/interfaces/device/cts500.interface.js +3 -0
- package/dist/cjs/interfaces/device/cts500.interface.js.map +1 -0
- package/dist/cjs/interfaces/device/forceboard.interface.d.ts +2 -2
- package/dist/cjs/interfaces/device/forceboard.interface.d.ts.map +1 -1
- package/dist/cjs/interfaces/device/motherboard.interface.d.ts +1 -1
- package/dist/cjs/interfaces/device/pb-700bt.interface.d.ts +53 -0
- package/dist/cjs/interfaces/device/pb-700bt.interface.d.ts.map +1 -0
- package/dist/cjs/interfaces/device/pb-700bt.interface.js +3 -0
- package/dist/cjs/interfaces/device/pb-700bt.interface.js.map +1 -0
- package/dist/cjs/interfaces/device/progressor.interface.d.ts +2 -2
- package/dist/cjs/interfaces/device/progressor.interface.d.ts.map +1 -1
- package/dist/cjs/interfaces/index.d.ts +4 -1
- package/dist/cjs/interfaces/index.d.ts.map +1 -1
- package/dist/cjs/interfaces/nordic.interface.d.ts +47 -0
- package/dist/cjs/interfaces/nordic.interface.d.ts.map +1 -0
- package/dist/cjs/interfaces/nordic.interface.js +3 -0
- package/dist/cjs/interfaces/nordic.interface.js.map +1 -0
- package/dist/cjs/models/device/{kilterboard.model.d.ts → aurora.model.d.ts} +82 -40
- package/dist/cjs/models/device/aurora.model.d.ts.map +1 -0
- package/dist/cjs/models/device/aurora.model.js +407 -0
- package/dist/cjs/models/device/aurora.model.js.map +1 -0
- package/dist/cjs/models/device/climbro.model.js +1 -1
- package/dist/cjs/models/device/climbro.model.js.map +1 -1
- package/dist/cjs/models/device/cts500.model.d.ts +173 -0
- package/dist/cjs/models/device/cts500.model.d.ts.map +1 -0
- package/dist/cjs/models/device/cts500.model.js +596 -0
- package/dist/cjs/models/device/cts500.model.js.map +1 -0
- package/dist/cjs/models/device/forceboard.model.d.ts +2 -2
- package/dist/cjs/models/device/forceboard.model.d.ts.map +1 -1
- package/dist/cjs/models/device/forceboard.model.js +9 -16
- package/dist/cjs/models/device/forceboard.model.js.map +1 -1
- package/dist/cjs/models/device/motherboard.model.d.ts +4 -1
- package/dist/cjs/models/device/motherboard.model.d.ts.map +1 -1
- package/dist/cjs/models/device/motherboard.model.js +26 -10
- package/dist/cjs/models/device/motherboard.model.js.map +1 -1
- package/dist/cjs/models/device/pb-700bt.model.d.ts +2 -1
- package/dist/cjs/models/device/pb-700bt.model.d.ts.map +1 -1
- package/dist/cjs/models/device/pb-700bt.model.js.map +1 -1
- package/dist/cjs/models/device/progressor.model.d.ts +2 -2
- package/dist/cjs/models/device/progressor.model.d.ts.map +1 -1
- package/dist/cjs/models/device/progressor.model.js +4 -20
- package/dist/cjs/models/device/progressor.model.js.map +1 -1
- package/dist/cjs/models/device/wh-c06.model.d.ts +2 -0
- package/dist/cjs/models/device/wh-c06.model.d.ts.map +1 -1
- package/dist/cjs/models/device/wh-c06.model.js +45 -34
- package/dist/cjs/models/device/wh-c06.model.js.map +1 -1
- package/dist/cjs/models/device.model.d.ts +25 -5
- package/dist/cjs/models/device.model.d.ts.map +1 -1
- package/dist/cjs/models/device.model.js +94 -24
- package/dist/cjs/models/device.model.js.map +1 -1
- package/dist/cjs/models/index.d.ts +3 -1
- package/dist/cjs/models/index.d.ts.map +1 -1
- package/dist/cjs/models/index.js +8 -4
- package/dist/cjs/models/index.js.map +1 -1
- package/dist/cjs/models/nordic.model.d.ts +128 -0
- package/dist/cjs/models/nordic.model.d.ts.map +1 -0
- package/dist/cjs/models/nordic.model.js +405 -0
- package/dist/cjs/models/nordic.model.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces/command.interface.d.ts +110 -21
- package/dist/interfaces/command.interface.d.ts.map +1 -1
- package/dist/interfaces/device/aurora.interface.d.ts +17 -0
- package/dist/interfaces/device/aurora.interface.d.ts.map +1 -0
- package/dist/interfaces/device/aurora.interface.js +2 -0
- package/dist/interfaces/device/aurora.interface.js.map +1 -0
- package/dist/interfaces/device/cts500.interface.d.ts +96 -0
- package/dist/interfaces/device/cts500.interface.d.ts.map +1 -0
- package/dist/interfaces/device/cts500.interface.js +2 -0
- package/dist/interfaces/device/cts500.interface.js.map +1 -0
- package/dist/interfaces/device/forceboard.interface.d.ts +2 -2
- package/dist/interfaces/device/forceboard.interface.d.ts.map +1 -1
- package/dist/interfaces/device/motherboard.interface.d.ts +1 -1
- package/dist/interfaces/device/pb-700bt.interface.d.ts +53 -0
- package/dist/interfaces/device/pb-700bt.interface.d.ts.map +1 -0
- package/dist/interfaces/device/pb-700bt.interface.js +2 -0
- package/dist/interfaces/device/pb-700bt.interface.js.map +1 -0
- package/dist/interfaces/device/progressor.interface.d.ts +2 -2
- package/dist/interfaces/device/progressor.interface.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts +4 -1
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/nordic.interface.d.ts +47 -0
- package/dist/interfaces/nordic.interface.d.ts.map +1 -0
- package/dist/interfaces/nordic.interface.js +2 -0
- package/dist/interfaces/nordic.interface.js.map +1 -0
- package/dist/models/device/{kilterboard.model.d.ts → aurora.model.d.ts} +82 -40
- package/dist/models/device/aurora.model.d.ts.map +1 -0
- package/dist/models/device/aurora.model.js +401 -0
- package/dist/models/device/aurora.model.js.map +1 -0
- package/dist/models/device/climbro.model.js +1 -1
- package/dist/models/device/climbro.model.js.map +1 -1
- package/dist/models/device/cts500.model.d.ts +173 -0
- package/dist/models/device/cts500.model.d.ts.map +1 -0
- package/dist/models/device/cts500.model.js +592 -0
- package/dist/models/device/cts500.model.js.map +1 -0
- package/dist/models/device/forceboard.model.d.ts +2 -2
- package/dist/models/device/forceboard.model.d.ts.map +1 -1
- package/dist/models/device/forceboard.model.js +9 -16
- package/dist/models/device/forceboard.model.js.map +1 -1
- package/dist/models/device/motherboard.model.d.ts +4 -1
- package/dist/models/device/motherboard.model.d.ts.map +1 -1
- package/dist/models/device/motherboard.model.js +26 -10
- package/dist/models/device/motherboard.model.js.map +1 -1
- package/dist/models/device/pb-700bt.model.d.ts +2 -1
- package/dist/models/device/pb-700bt.model.d.ts.map +1 -1
- package/dist/models/device/pb-700bt.model.js.map +1 -1
- package/dist/models/device/progressor.model.d.ts +2 -2
- package/dist/models/device/progressor.model.d.ts.map +1 -1
- package/dist/models/device/progressor.model.js +4 -20
- package/dist/models/device/progressor.model.js.map +1 -1
- package/dist/models/device/wh-c06.model.d.ts +2 -0
- package/dist/models/device/wh-c06.model.d.ts.map +1 -1
- package/dist/models/device/wh-c06.model.js +44 -34
- package/dist/models/device/wh-c06.model.js.map +1 -1
- package/dist/models/device.model.d.ts +25 -5
- package/dist/models/device.model.d.ts.map +1 -1
- package/dist/models/device.model.js +93 -24
- package/dist/models/device.model.js.map +1 -1
- package/dist/models/index.d.ts +3 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +3 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/nordic.model.d.ts +128 -0
- package/dist/models/nordic.model.d.ts.map +1 -0
- package/dist/models/nordic.model.js +393 -0
- package/dist/models/nordic.model.js.map +1 -0
- package/package.json +47 -43
- package/src/index.ts +6 -3
- package/src/interfaces/command.interface.ts +131 -21
- package/src/interfaces/device/aurora.interface.ts +18 -0
- package/src/interfaces/device/cts500.interface.ts +113 -0
- package/src/interfaces/device/forceboard.interface.ts +2 -2
- package/src/interfaces/device/motherboard.interface.ts +1 -1
- package/src/interfaces/device/pb-700bt.interface.ts +61 -0
- package/src/interfaces/device/progressor.interface.ts +2 -2
- package/src/interfaces/index.ts +8 -2
- package/src/interfaces/nordic.interface.ts +47 -0
- package/src/models/device/aurora.model.ts +497 -0
- package/src/models/device/climbro.model.ts +1 -1
- package/src/models/device/cts500.model.ts +709 -0
- package/src/models/device/forceboard.model.ts +9 -16
- package/src/models/device/motherboard.model.ts +51 -9
- package/src/models/device/pb-700bt.model.ts +2 -1
- package/src/models/device/progressor.model.ts +4 -20
- package/src/models/device/wh-c06.model.ts +54 -42
- package/src/models/device.model.ts +104 -24
- package/src/models/index.ts +5 -1
- package/src/models/nordic.model.ts +468 -0
- package/dist/cjs/interfaces/device/kilterboard.interface.d.ts +0 -17
- package/dist/cjs/interfaces/device/kilterboard.interface.d.ts.map +0 -1
- package/dist/cjs/interfaces/device/kilterboard.interface.js.map +0 -1
- package/dist/cjs/models/device/kilterboard.model.d.ts.map +0 -1
- package/dist/cjs/models/device/kilterboard.model.js +0 -327
- package/dist/cjs/models/device/kilterboard.model.js.map +0 -1
- package/dist/interfaces/device/kilterboard.interface.d.ts +0 -17
- package/dist/interfaces/device/kilterboard.interface.d.ts.map +0 -1
- package/dist/interfaces/device/kilterboard.interface.js +0 -2
- package/dist/interfaces/device/kilterboard.interface.js.map +0 -1
- package/dist/models/device/kilterboard.model.d.ts.map +0 -1
- package/dist/models/device/kilterboard.model.js +0 -323
- package/dist/models/device/kilterboard.model.js.map +0 -1
- package/dist/tsconfig.cjs.tsbuildinfo +0 -1
- package/src/interfaces/device/kilterboard.interface.ts +0 -12
- package/src/models/device/kilterboard.model.ts +0 -347
package/src/index.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export type {
|
|
2
|
+
AuroraLedPlacement,
|
|
3
|
+
IAurora,
|
|
2
4
|
IClimbro,
|
|
5
|
+
ICTS500,
|
|
3
6
|
IEntralpi,
|
|
4
7
|
IForceBoard,
|
|
5
|
-
IKilterBoard,
|
|
6
8
|
IMotherboard,
|
|
7
9
|
ImySmartBoard,
|
|
10
|
+
IPB700BT,
|
|
8
11
|
IProgressor,
|
|
9
12
|
ISmartBoardPro,
|
|
10
13
|
IWHC06,
|
|
@@ -19,11 +22,11 @@ export type {
|
|
|
19
22
|
} from "./interfaces/callback.interface.js"
|
|
20
23
|
|
|
21
24
|
export {
|
|
25
|
+
AuroraBoard,
|
|
22
26
|
Climbro,
|
|
27
|
+
CTS500,
|
|
23
28
|
Entralpi,
|
|
24
29
|
ForceBoard,
|
|
25
|
-
KilterBoard,
|
|
26
|
-
KilterBoardPlacementRoles,
|
|
27
30
|
Motherboard,
|
|
28
31
|
mySmartBoard,
|
|
29
32
|
PB700BT,
|
|
@@ -8,25 +8,25 @@ export interface Commands {
|
|
|
8
8
|
* Starts a weight measurement on the device.
|
|
9
9
|
* Used to begin collecting weight or force data.
|
|
10
10
|
*/
|
|
11
|
-
START_WEIGHT_MEAS?: string
|
|
11
|
+
START_WEIGHT_MEAS?: string | Uint8Array
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Stops the current weight measurement on the device.
|
|
15
15
|
* Used to end the data collection.
|
|
16
16
|
*/
|
|
17
|
-
STOP_WEIGHT_MEAS?: string
|
|
17
|
+
STOP_WEIGHT_MEAS?: string | Uint8Array
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Puts the device to sleep or in a low-power mode.
|
|
21
21
|
* The format can be a string or a number depending on the device.
|
|
22
22
|
*/
|
|
23
|
-
SLEEP?: number | string
|
|
23
|
+
SLEEP?: number | string | Uint8Array
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Retrieves the serial number of the device.
|
|
27
27
|
* This command fetches the unique identifier assigned by the manufacturer.
|
|
28
28
|
*/
|
|
29
|
-
GET_SERIAL?: string
|
|
29
|
+
GET_SERIAL?: string | Uint8Array
|
|
30
30
|
|
|
31
31
|
// Griptonite Motherboard
|
|
32
32
|
|
|
@@ -34,19 +34,19 @@ export interface Commands {
|
|
|
34
34
|
* Retrieves textual information from the device.
|
|
35
35
|
* May include readable data.
|
|
36
36
|
*/
|
|
37
|
-
GET_TEXT?: string
|
|
37
|
+
GET_TEXT?: string | Uint8Array
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Starts or stops a debug data stream from the device.
|
|
41
41
|
* Used for diagnostic purposes or to monitor real-time data.
|
|
42
42
|
*/
|
|
43
|
-
DEBUG_STREAM?: string
|
|
43
|
+
DEBUG_STREAM?: string | Uint8Array
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* Retrieves calibration data from the device.
|
|
47
47
|
* Used to ensure accurate measurements by applying calibration points.
|
|
48
48
|
*/
|
|
49
|
-
GET_CALIBRATION?: string
|
|
49
|
+
GET_CALIBRATION?: string | Uint8Array
|
|
50
50
|
|
|
51
51
|
// Force Board Portable
|
|
52
52
|
|
|
@@ -55,7 +55,7 @@ export interface Commands {
|
|
|
55
55
|
* In this mode, data transmission starts when force exceeds the threshold
|
|
56
56
|
* and stops when force drops below the threshold.
|
|
57
57
|
*/
|
|
58
|
-
START_QUICK_MEAS?: string
|
|
58
|
+
START_QUICK_MEAS?: string | Uint8Array
|
|
59
59
|
|
|
60
60
|
// Tindeq Progressor
|
|
61
61
|
|
|
@@ -63,76 +63,186 @@ export interface Commands {
|
|
|
63
63
|
* Tares the scale, zeroing the current weight measurement.
|
|
64
64
|
* Used to reset the baseline for weight data.
|
|
65
65
|
*/
|
|
66
|
-
TARE_SCALE?: string
|
|
66
|
+
TARE_SCALE?: string | Uint8Array
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Starts measuring the peak rate of force development (RFD).
|
|
70
70
|
* Captures how quickly force is applied over time.
|
|
71
71
|
*/
|
|
72
|
-
START_PEAK_RFD_MEAS?: string
|
|
72
|
+
START_PEAK_RFD_MEAS?: string | Uint8Array
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* Starts measuring a series of peak RFD measurements.
|
|
76
76
|
* This captures multiple RFD data points over a period of time.
|
|
77
77
|
*/
|
|
78
|
-
START_PEAK_RFD_MEAS_SERIES?: string
|
|
78
|
+
START_PEAK_RFD_MEAS_SERIES?: string | Uint8Array
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* Adds a calibration point to the device.
|
|
82
82
|
* Used to improve the accuracy of future measurements.
|
|
83
83
|
*/
|
|
84
|
-
ADD_CALIBRATION_POINT?: string
|
|
84
|
+
ADD_CALIBRATION_POINT?: string | Uint8Array
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* Saves the current calibration settings to the device.
|
|
88
88
|
* Ensures the device remembers the calibration for future sessions.
|
|
89
89
|
*/
|
|
90
|
-
SAVE_CALIBRATION?: string
|
|
90
|
+
SAVE_CALIBRATION?: string | Uint8Array
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Retrieves the firmware version of the device.
|
|
94
94
|
* Useful for ensuring compatibility and tracking updates.
|
|
95
95
|
*/
|
|
96
|
-
GET_FIRMWARE_VERSION?: string
|
|
96
|
+
GET_FIRMWARE_VERSION?: string | Uint8Array
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* Retrieves error information from the device.
|
|
100
100
|
* Provides details on any faults or issues that occurred during operation.
|
|
101
101
|
*/
|
|
102
|
-
GET_ERROR_INFORMATION?: string
|
|
102
|
+
GET_ERROR_INFORMATION?: string | Uint8Array
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* Clears the error information on the device.
|
|
106
106
|
* Used to reset error logs after troubleshooting or repair.
|
|
107
107
|
*/
|
|
108
|
-
CLR_ERROR_INFORMATION?: string
|
|
108
|
+
CLR_ERROR_INFORMATION?: string | Uint8Array
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* Retrieves the battery voltage level of the device.
|
|
112
112
|
* Provides insight into the device's remaining battery power.
|
|
113
113
|
*/
|
|
114
|
-
GET_BATTERY_VOLTAGE?: string
|
|
114
|
+
GET_BATTERY_VOLTAGE?: string | Uint8Array
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Retrieves a temperature reading from the device.
|
|
118
|
+
*/
|
|
119
|
+
GET_TEMPERATURE?: string | Uint8Array
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Retrieves the current weight from the device.
|
|
123
|
+
*/
|
|
124
|
+
GET_WEIGHT?: string | Uint8Array
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Sets the device capacity/range.
|
|
128
|
+
* Payload selects the target range.
|
|
129
|
+
*/
|
|
130
|
+
SET_RANGE?: string | number | Uint8Array
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Sets the display division value.
|
|
134
|
+
* Payload selects the target division.
|
|
135
|
+
*/
|
|
136
|
+
SET_DIVISION?: string | number | Uint8Array
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Sets the first calibration reference weight.
|
|
140
|
+
* Payload selects the target calibration mass.
|
|
141
|
+
*/
|
|
142
|
+
SET_FIRST_CALIBRATION_WEIGHT?: string | number | Uint8Array
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Sets the second calibration reference weight.
|
|
146
|
+
* Payload selects the target calibration mass.
|
|
147
|
+
*/
|
|
148
|
+
SET_SECOND_CALIBRATION_WEIGHT?: string | number | Uint8Array
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Runs the no-load calibration routine.
|
|
152
|
+
*/
|
|
153
|
+
NO_LOAD_CALIBRATION?: string | Uint8Array
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Runs the first calibration step after the reference mass is applied.
|
|
157
|
+
*/
|
|
158
|
+
RUN_FIRST_CALIBRATION?: string | Uint8Array
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Runs the second calibration step after the reference mass is applied.
|
|
162
|
+
*/
|
|
163
|
+
RUN_SECOND_CALIBRATION?: string | Uint8Array
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Configures the automatic shutdown timer.
|
|
167
|
+
* Payload selects the timeout or disables it.
|
|
168
|
+
*/
|
|
169
|
+
SET_SHUTDOWN_TIME?: string | number | Uint8Array
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Configures the upper temperature limit threshold.
|
|
173
|
+
*/
|
|
174
|
+
SET_UPPER_TEMPERATURE_LIMIT?: string | number | Uint8Array
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Configures the lower temperature limit threshold.
|
|
178
|
+
*/
|
|
179
|
+
SET_LOWER_TEMPERATURE_LIMIT?: string | number | Uint8Array
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Configures the upper/max weight limit threshold.
|
|
183
|
+
*/
|
|
184
|
+
SET_MAX_WEIGHT_LIMIT?: string | number | Uint8Array
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Configures the lower/min weight limit threshold.
|
|
188
|
+
*/
|
|
189
|
+
SET_MIN_WEIGHT_LIMIT?: string | number | Uint8Array
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Configures the weight-alarm behavior for the configured upper/lower thresholds.
|
|
193
|
+
*/
|
|
194
|
+
SET_WEIGHT_ALARM_MODE?: string | number | Uint8Array
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Enables or disables alarm-frame output over the serial/BLE transport.
|
|
198
|
+
*/
|
|
199
|
+
SET_ALARM_OUTPUT?: string | number | Uint8Array
|
|
115
200
|
|
|
116
201
|
/**
|
|
117
202
|
* Get the Progressor ID.
|
|
118
203
|
*/
|
|
119
|
-
GET_PROGRESSOR_ID?: string
|
|
204
|
+
GET_PROGRESSOR_ID?: string | Uint8Array
|
|
120
205
|
|
|
121
206
|
/**
|
|
122
207
|
* Set calibration block. Payload at offsets +2,+6,+10.
|
|
123
208
|
* The 12-byte block is interpreted as 3× float32 LE: slope, intercept, trim.
|
|
124
209
|
*/
|
|
125
|
-
SET_CALIBRATION?: string
|
|
210
|
+
SET_CALIBRATION?: string | Uint8Array
|
|
126
211
|
|
|
127
212
|
/**
|
|
128
213
|
* Retrieves the advanced calibration table from the device.
|
|
129
214
|
* Used to inspect the hidden piecewise interpolation table exported by v2 firmware.
|
|
130
215
|
*/
|
|
131
|
-
GET_CALIBRATION_TABLE?: string
|
|
216
|
+
GET_CALIBRATION_TABLE?: string | Uint8Array
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Controls whether the device resets to zero on power-up.
|
|
220
|
+
*/
|
|
221
|
+
POWER_ON_RESET?: string | number | Uint8Array
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Updates the device's hardware zero point.
|
|
225
|
+
*/
|
|
226
|
+
ZERO_SCALE?: string | number | Uint8Array
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Toggles the device's peak mode.
|
|
230
|
+
*/
|
|
231
|
+
PEAK_MODE?: string | number | Uint8Array
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Configures the device UART baud rate.
|
|
235
|
+
*/
|
|
236
|
+
SET_BAUD_RATE?: string | number | Uint8Array
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Configures the device sampling rate.
|
|
240
|
+
*/
|
|
241
|
+
SET_SAMPLING_RATE?: string | number | Uint8Array
|
|
132
242
|
|
|
133
243
|
/**
|
|
134
244
|
* Reboots the device immediately.
|
|
135
245
|
* Intended for diagnostic flows.
|
|
136
246
|
*/
|
|
137
|
-
REBOOT?: string
|
|
247
|
+
REBOOT?: string | Uint8Array
|
|
138
248
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IDevice } from "../device.interface.js"
|
|
2
|
+
|
|
3
|
+
export interface AuroraLedPlacement {
|
|
4
|
+
position: number
|
|
5
|
+
color: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Interface representing an Aurora LED board device.
|
|
10
|
+
*/
|
|
11
|
+
export interface IAurora extends IDevice {
|
|
12
|
+
/**
|
|
13
|
+
* Configures the LEDs based on an array of climb placements.
|
|
14
|
+
* @param config - Array of climb placements for the LEDs. Each placement must include an LED position and color hex string.
|
|
15
|
+
* @returns A promise that resolves with the payload array if LED settings were applied, or `undefined` if no action was taken.
|
|
16
|
+
*/
|
|
17
|
+
led(config?: AuroraLedPlacement[]): Promise<number[] | undefined>
|
|
18
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { IDevice } from "../device.interface.js"
|
|
2
|
+
|
|
3
|
+
export type CTS500BaudRate = 9600 | 19200 | 38400 | 57600 | 115200
|
|
4
|
+
|
|
5
|
+
export type CTS500SamplingRate = 10 | 20 | 40 | 80 | 160 | 320
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Interface representing the CTS500 device, extending the base Device interface.
|
|
9
|
+
*/
|
|
10
|
+
export interface ICTS500 extends IDevice {
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves battery voltage from the device.
|
|
13
|
+
* The returned string is the voltage in volts with two decimal places.
|
|
14
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the battery voltage.
|
|
15
|
+
*/
|
|
16
|
+
battery(): Promise<string | undefined>
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves firmware version from the device.
|
|
20
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the firmware version.
|
|
21
|
+
*/
|
|
22
|
+
firmware(): Promise<string | undefined>
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves hardware version from the device.
|
|
26
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the hardware version.
|
|
27
|
+
*/
|
|
28
|
+
hardware(): Promise<string | undefined>
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves manufacturer information from the device.
|
|
32
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the manufacturer information.
|
|
33
|
+
*/
|
|
34
|
+
manufacturer(): Promise<string | undefined>
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves model number from the device.
|
|
38
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the model number.
|
|
39
|
+
*/
|
|
40
|
+
model(): Promise<string | undefined>
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Retrieves serial number from the device.
|
|
44
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the serial number.
|
|
45
|
+
*/
|
|
46
|
+
serial(): Promise<string | undefined>
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves software version from the device.
|
|
50
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the software version.
|
|
51
|
+
*/
|
|
52
|
+
software(): Promise<string | undefined>
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Sets whether the device should reset to zero on power-up.
|
|
56
|
+
* @param {boolean} enabled - Whether to reset to zero on power-up.
|
|
57
|
+
* @returns {Promise<void>} A Promise that resolves when the command has been acknowledged.
|
|
58
|
+
*/
|
|
59
|
+
powerOnReset(enabled: boolean): Promise<void>
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Enables or disables peak mode.
|
|
63
|
+
* @param {boolean} enabled - Whether peak mode should be enabled.
|
|
64
|
+
* @returns {Promise<void>} A Promise that resolves when the command has been acknowledged.
|
|
65
|
+
*/
|
|
66
|
+
peakMode(enabled?: boolean): Promise<void>
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Configures the transparent UART baud rate on the device.
|
|
70
|
+
* @param {CTS500BaudRate} baudRate - Desired baud rate.
|
|
71
|
+
* @returns {Promise<void>} A Promise that resolves when the command has been acknowledged.
|
|
72
|
+
*/
|
|
73
|
+
setBaudRate(baudRate: CTS500BaudRate): Promise<void>
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Configures the device A/D sampling rate.
|
|
77
|
+
* @param {CTS500SamplingRate} samplingRate - Desired A/D sampling rate in Hz.
|
|
78
|
+
* @returns {Promise<void>} A Promise that resolves when the command has been acknowledged.
|
|
79
|
+
*/
|
|
80
|
+
setSamplingRate(samplingRate: CTS500SamplingRate): Promise<void>
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Starts automatic weight uploads over the notify characteristic.
|
|
84
|
+
* @param {number} [duration=0] - Optional delay before the promise resolves.
|
|
85
|
+
* @returns {Promise<void>} A Promise that resolves once automatic upload has been enabled.
|
|
86
|
+
*/
|
|
87
|
+
stream(duration?: number): Promise<void>
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Stops automatic weight uploads over the notify characteristic.
|
|
91
|
+
* @returns {Promise<void>} A Promise that resolves once automatic upload has been disabled.
|
|
92
|
+
*/
|
|
93
|
+
stop(): Promise<void>
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Retrieves the current temperature reading from the device.
|
|
97
|
+
* The returned string is the temperature in Celsius.
|
|
98
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the temperature.
|
|
99
|
+
*/
|
|
100
|
+
temperature(): Promise<string | undefined>
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Retrieves the current weight from the device in kilograms.
|
|
104
|
+
* @returns {Promise<number | undefined>} A Promise that resolves with the current weight.
|
|
105
|
+
*/
|
|
106
|
+
weight(): Promise<number | undefined>
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Updates the hardware zero point.
|
|
110
|
+
* @returns {Promise<void>} A Promise that resolves when the command has been acknowledged.
|
|
111
|
+
*/
|
|
112
|
+
zero(): Promise<void>
|
|
113
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { INordicDfuDevice } from "../nordic.interface.js"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Interface representing the PitchSix ForceBoard device, extending the base Device interface.
|
|
5
5
|
*/
|
|
6
|
-
export interface IForceBoard extends
|
|
6
|
+
export interface IForceBoard extends INordicDfuDevice {
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves battery or voltage information from the device.
|
|
9
9
|
* @returns {Promise<string | undefined>} A Promise that resolves with the battery or voltage information.
|
|
@@ -31,7 +31,7 @@ export interface IMotherboard extends IDevice {
|
|
|
31
31
|
/**
|
|
32
32
|
* Sets the LED color based on a single color option.
|
|
33
33
|
* @param {"green" | "red" | "orange"} [config] - Optional color for the LEDs.
|
|
34
|
-
* @returns {Promise<number[] | undefined>} A promise that resolves with the payload array for
|
|
34
|
+
* @returns {Promise<number[] | undefined>} A promise that resolves with the payload array for Aurora-compatible LED settings if LEDs were applied.
|
|
35
35
|
*/
|
|
36
36
|
led(config?: "green" | "red" | "orange"): Promise<number[] | undefined>
|
|
37
37
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { IDevice } from "../device.interface.js"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interface representing the NSD PB-700BT device, extending the base Device interface.
|
|
5
|
+
*/
|
|
6
|
+
export interface IPB700BT extends IDevice {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves battery or voltage information from the device.
|
|
9
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the battery or voltage information.
|
|
10
|
+
*/
|
|
11
|
+
battery(): Promise<string | undefined>
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves IEEE 11073-20601 Regulatory Certification from the device.
|
|
15
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the firmware version.
|
|
16
|
+
*/
|
|
17
|
+
certification(): Promise<string | undefined>
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves firmware version from the device.
|
|
21
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the firmware version.
|
|
22
|
+
*/
|
|
23
|
+
firmware(): Promise<string | undefined>
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves hardware version from the device.
|
|
27
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the hardware version.
|
|
28
|
+
*/
|
|
29
|
+
hardware(): Promise<string | undefined>
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves manufacturer information from the device.
|
|
33
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the manufacturer information.
|
|
34
|
+
*/
|
|
35
|
+
manufacturer(): Promise<string | undefined>
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves model number from the device.
|
|
39
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the model number.
|
|
40
|
+
*/
|
|
41
|
+
model(): Promise<string | undefined>
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Retrieves PnP ID from the device, a set of values that used to create a device ID value that is unique for this device.
|
|
45
|
+
* Included in the characteristic is a Vendor ID Source field, a Vendor ID field, a Product ID field and a Product Version field
|
|
46
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the PnP ID.
|
|
47
|
+
*/
|
|
48
|
+
pnp(): Promise<string | undefined>
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves software version from the device.
|
|
52
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the software version.
|
|
53
|
+
*/
|
|
54
|
+
software(): Promise<string | undefined>
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Retrieves system id from the device.
|
|
58
|
+
* @returns {Promise<string | undefined>} A Promise that resolves with the system id.
|
|
59
|
+
*/
|
|
60
|
+
system(): Promise<string | undefined>
|
|
61
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { INordicDfuDevice } from "../nordic.interface.js"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Interface representing the Tindeq Progressor device, extending the base Device interface.
|
|
5
5
|
*/
|
|
6
|
-
export interface IProgressor extends
|
|
6
|
+
export interface IProgressor extends INordicDfuDevice {
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves battery or voltage information from the device.
|
|
9
9
|
* @returns {Promise<string | undefined>} A Promise that resolves with the battery or voltage information.
|
package/src/interfaces/index.ts
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
export type { IClimbro } from "./device/climbro.interface.js"
|
|
2
2
|
|
|
3
|
+
export type { AuroraLedPlacement, IAurora } from "./device/aurora.interface.js"
|
|
4
|
+
|
|
5
|
+
export type { ICTS500 } from "./device/cts500.interface.js"
|
|
6
|
+
|
|
3
7
|
export type { IEntralpi } from "./device/entralpi.interface.js"
|
|
4
8
|
|
|
5
9
|
export type { IForceBoard } from "./device/forceboard.interface.js"
|
|
6
10
|
|
|
7
|
-
export type { IKilterBoard } from "./device/kilterboard.interface.js"
|
|
8
|
-
|
|
9
11
|
export type { IMotherboard } from "./device/motherboard.interface.js"
|
|
10
12
|
|
|
11
13
|
export type { ImySmartBoard } from "./device/mysmartboard.interface.js"
|
|
12
14
|
|
|
15
|
+
export type { INordicDfuDevice } from "./nordic.interface.js"
|
|
16
|
+
|
|
17
|
+
export type { IPB700BT } from "./device/pb-700bt.interface.js"
|
|
18
|
+
|
|
13
19
|
export type { IProgressor } from "./device/progressor.interface.js"
|
|
14
20
|
|
|
15
21
|
export type { ISmartBoardPro } from "./device/smartboard-pro.interface.js"
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { IDevice } from "./device.interface.js"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared Nordic Secure DFU functionality for devices that expose the FE59 DFU service.
|
|
5
|
+
*/
|
|
6
|
+
export interface INordicDfuDevice extends IDevice {
|
|
7
|
+
/**
|
|
8
|
+
* Switches the device from application mode into the Nordic DFU bootloader.
|
|
9
|
+
*/
|
|
10
|
+
dfuSwitch(): Promise<void>
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Sends a raw Nordic Secure DFU control operation and resolves with the response payload bytes.
|
|
14
|
+
* Call after dfuSwitch() has reconnected to the DFU bootloader.
|
|
15
|
+
*/
|
|
16
|
+
dfuControl(operation: Uint8Array, payload?: ArrayBuffer): Promise<Uint8Array>
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Sends Nordic Secure DFU SELECT for command or data objects and returns the bootloader state.
|
|
20
|
+
*/
|
|
21
|
+
dfuSelect(objectType: "command" | "data"): Promise<{ maxSize: number; offset: number; crc: number }>
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Sends Nordic Secure DFU CREATE for command or data objects.
|
|
25
|
+
*/
|
|
26
|
+
dfuCreate(objectType: "command" | "data", size: number): Promise<void>
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Writes raw bytes to the Nordic Secure DFU packet characteristic.
|
|
30
|
+
*/
|
|
31
|
+
dfuWritePacket(data: Uint8Array | ArrayBuffer): Promise<void>
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Sends Nordic Secure DFU CALCULATE_CHECKSUM and returns the bootloader state.
|
|
35
|
+
*/
|
|
36
|
+
dfuChecksum(): Promise<{ offset: number; crc: number }>
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Sends Nordic Secure DFU EXECUTE for the currently created object.
|
|
40
|
+
*/
|
|
41
|
+
dfuExecute(): Promise<void>
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Runs a complete Nordic Secure DFU upload: switch to bootloader, send init packet, then send firmware.
|
|
45
|
+
*/
|
|
46
|
+
dfuUpload(initPacket: Uint8Array | ArrayBuffer, firmware: Uint8Array | ArrayBuffer): Promise<void>
|
|
47
|
+
}
|