@garmin/fitsdk 21.170.0 → 21.178.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 +74 -9
- package/package.json +1 -1
- package/src/accumulator.js +2 -2
- package/src/bit-stream.js +2 -2
- package/src/crc-calculator.js +2 -2
- package/src/decoder.js +4 -4
- package/src/encoder.js +6 -11
- package/src/fit.js +4 -2
- package/src/index.js +2 -2
- package/src/mesg-definition.js +10 -4
- package/src/output-stream.js +2 -2
- package/src/profile.js +109 -3
- package/src/stream.js +2 -2
- package/src/utils-hr-mesg.js +2 -2
- package/src/utils-internal.js +2 -2
- package/src/utils-memo-glob.js +2 -2
- package/src/utils.js +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,8 @@ The FIT JavaScript SDK uses ECMAScript module syntax and requires Node.js v14.0
|
|
|
9
9
|
```sh
|
|
10
10
|
npm install @garmin/fitsdk
|
|
11
11
|
```
|
|
12
|
-
##
|
|
12
|
+
## Decoder
|
|
13
|
+
### Usage
|
|
13
14
|
````js
|
|
14
15
|
import { Decoder, Stream, Profile, Utils } from '@garmin/fitsdk';
|
|
15
16
|
|
|
@@ -27,8 +28,6 @@ const { messages, errors } = decoder.read();
|
|
|
27
28
|
console.log(errors);
|
|
28
29
|
console.log(messages);
|
|
29
30
|
````
|
|
30
|
-
## Decoder
|
|
31
|
-
|
|
32
31
|
### Constructor
|
|
33
32
|
|
|
34
33
|
Decoder objects are created from Streams representing the binary FIT file data to be decoded. See [Creating Streams](#creatingstreams) for more information on constructing Stream objects.
|
|
@@ -37,16 +36,16 @@ Once a Decoder object is created it can be used to check that the Stream is a FI
|
|
|
37
36
|
|
|
38
37
|
### isFIT Method
|
|
39
38
|
|
|
40
|
-
All valid FIT files should include a 12 or 14 byte file header. The 14 byte header is the preferred header size and the most common size used. Bytes 8–11 of the header contain the ASCII values ".FIT
|
|
39
|
+
All valid FIT files should include a 12 or 14 byte file header. The 14 byte header is the preferred header size and the most common size used. Bytes 8–11 of the header contain the ASCII values ".FIT". This string can easily be spotted when opening a binary FIT file in a text or hex editor.
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
````bash
|
|
43
42
|
Offset: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
|
|
44
43
|
00000000: 0E 10 43 08 78 06 09 00 2E 46 49 54 96 85 40 00 ..C.x....FIT..@.
|
|
45
44
|
00000010: 00 00 00 07 03 04 8C 04 04 86 07 04 86 01 02 84 ................
|
|
46
45
|
00000020: 02 02 84 05 02 84 00 01 00 00 19 28 7E C5 95 B0 ...........(~E.0
|
|
47
|
-
|
|
46
|
+
````
|
|
48
47
|
|
|
49
|
-
The isFIT method reads the file header and returns true if bytes 8–11 are equal to the ACSII values ".FIT
|
|
48
|
+
The isFIT method reads the file header and returns true if bytes 8–11 are equal to the ACSII values ".FIT". isFIT provides a quick way to check that the file is a FIT file before attempting to decode the file.
|
|
50
49
|
|
|
51
50
|
The Decoder class includes a static and instance version of the isFIT method.
|
|
52
51
|
|
|
@@ -54,7 +53,7 @@ The Decoder class includes a static and instance version of the isFIT method.
|
|
|
54
53
|
|
|
55
54
|
The checkIntegrity method performs three checks on a FIT file:
|
|
56
55
|
|
|
57
|
-
1. Checks that bytes 8–11 of the header contain the ASCII values ".FIT
|
|
56
|
+
1. Checks that bytes 8–11 of the header contain the ASCII values ".FIT".
|
|
58
57
|
2. Checks that the total file size is equal to Header Size + Data Size + CRC Size.
|
|
59
58
|
3. Reads the contents of the file, computes the CRC, and then checks that the computed CRC matches the file CRC.
|
|
60
59
|
|
|
@@ -77,13 +76,13 @@ const { messages, errors } = decoder.read({
|
|
|
77
76
|
convertDateTimesToDates: true,
|
|
78
77
|
includeUnknownData: false,
|
|
79
78
|
mergeHeartRates: true
|
|
79
|
+
decodeMemoGlobs: false,
|
|
80
80
|
});
|
|
81
81
|
````
|
|
82
82
|
#### mesgListener = (messageNumber, message) => {}
|
|
83
83
|
Optional callback function that can be used to inspect or manipulate messages after they are fully decoded and all the options have been applied. The message is mutable and we be returned from the Read method in the messages dictionary.
|
|
84
84
|
|
|
85
85
|
Example mesgListener callback that tracks the field names across all Record messages.
|
|
86
|
-
|
|
87
86
|
````js
|
|
88
87
|
const recordFields = new Set();
|
|
89
88
|
|
|
@@ -180,6 +179,10 @@ When true unknown field values are stored in the message using the field id as t
|
|
|
180
179
|
````
|
|
181
180
|
#### mergeHeartRates: true | false
|
|
182
181
|
When true automatically merge heart rate values from HR messages into the Record messages. This option requires the applyScaleAndOffset and expandComponents options to be enabled. This option has no effect on the Record messages when no HR messages are present in the decoded messages.
|
|
182
|
+
|
|
183
|
+
#### decodeMemoGlobs: true | false
|
|
184
|
+
When true, the decoder will reconstruct strings from memoGlob messages. Each reconstructed string will overwrite the targeted message field.
|
|
185
|
+
|
|
183
186
|
## Creating Streams
|
|
184
187
|
Stream objects contain the binary FIT data to be decoded. Streams objects can be created from byte-arrays, ArrayBuffers, and Node.js Buffers. Internally the Stream class uses an ArrayBuffer to manage the byte stream.
|
|
185
188
|
#### From a Byte Array
|
|
@@ -221,3 +224,65 @@ A convince method for converting FIT Epoch values to JavaScript Date objects.
|
|
|
221
224
|
````js
|
|
222
225
|
const jsDate = Utils.convertDateTimeToDate(fitDateTime);
|
|
223
226
|
````
|
|
227
|
+
## Encoder
|
|
228
|
+
### Usage
|
|
229
|
+
````js
|
|
230
|
+
// Import the SDK
|
|
231
|
+
import { Encoder, Profile} from "@garmin/fitsdk";
|
|
232
|
+
|
|
233
|
+
// Create an Encoder
|
|
234
|
+
const encoder = new Encoder();
|
|
235
|
+
|
|
236
|
+
//
|
|
237
|
+
// Write messages to the output-stream
|
|
238
|
+
//
|
|
239
|
+
// The message data should match the format returned by
|
|
240
|
+
// the Decoder. Field names should be camelCase. The fields
|
|
241
|
+
// definitions can be found in the Profile.
|
|
242
|
+
//
|
|
243
|
+
|
|
244
|
+
// Pass the MesgNum and message data as separate parameters to the onMesg() method
|
|
245
|
+
encoder.onMesg(Profile.MesgNum.FILE_ID, {
|
|
246
|
+
manufacturer: "development",
|
|
247
|
+
product: 1,
|
|
248
|
+
timeCreated: new Date(),
|
|
249
|
+
type: "activity",
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
// The writeMesg() method expects the mesgNum to be included in the message data
|
|
253
|
+
// Internally, writeMesg() calls onMesg()
|
|
254
|
+
encoder.writeMesg({
|
|
255
|
+
mesgNum: Profile.MesgNum.FILE_ID,
|
|
256
|
+
manufacturer: "development",
|
|
257
|
+
product: 1,
|
|
258
|
+
timeCreated: new Date(),
|
|
259
|
+
type: "activity",
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
// Unknown values in the message will be ignored by the Encoder
|
|
263
|
+
encoder.onMesg(Profile.MesgNum.FILE_ID, {
|
|
264
|
+
manufacturer: "development",
|
|
265
|
+
product: 1,
|
|
266
|
+
timeCreated: new Date(),
|
|
267
|
+
type: "activity",
|
|
268
|
+
customField: 12345, // This value will be ignored by the Encoder
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
// Subfield values in the message will be ignored by the Encoder
|
|
272
|
+
encoder.onMesg(Profile.MesgNum.FILE_ID, {
|
|
273
|
+
manufacturer: "development",
|
|
274
|
+
product: 4440, // This is the main product field, which is a uint16
|
|
275
|
+
garminProduct: "edge1050", // This value will be ignored by the Encoder, use the main field value instead
|
|
276
|
+
timeCreated: new Date(),
|
|
277
|
+
type: "activity",
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
// Closing the encoder returns the file as an UInt8 Array
|
|
281
|
+
const uint8Array = encoder.close();
|
|
282
|
+
|
|
283
|
+
// Write the file to disk,
|
|
284
|
+
import * as fs from "fs";
|
|
285
|
+
fs.writeFileSync("example.fit", uint8Array);
|
|
286
|
+
|
|
287
|
+
````
|
|
288
|
+
See the [Encode Activity Recipe](https://github.com/garmin/fit-javascript-sdk/blob/main/test/encode-activity-recipe.test.js) for a complete example of encoding a FIT Activity file usine the FIT JavaScript SDK.
|
package/package.json
CHANGED
package/src/accumulator.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/bit-stream.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/crc-calculator.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/decoder.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
|
@@ -729,8 +729,8 @@ class Decoder {
|
|
|
729
729
|
return rawFieldValue;
|
|
730
730
|
}
|
|
731
731
|
|
|
732
|
-
const scale = Array.isArray(field?.scale ??
|
|
733
|
-
const offset = Array.isArray(field?.offset ??
|
|
732
|
+
const scale = Array.isArray(field?.scale ?? FIT.FIELD_DEFAULT_SCALE) ? field?.scale[0] : field?.scale ?? FIT.FIELD_DEFAULT_SCALE;
|
|
733
|
+
const offset = Array.isArray(field?.offset ?? FIT.FIELD_DEFAULT_OFFSET) ? field?.offset[0] : field?.offset ?? FIT.FIELD_DEFAULT_OFFSET;
|
|
734
734
|
|
|
735
735
|
try {
|
|
736
736
|
if (Array.isArray(rawFieldValue)) {
|
package/src/encoder.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
|
@@ -20,9 +20,6 @@ import Utils from "./utils.js";
|
|
|
20
20
|
const HEADER_WITH_CRC_SIZE = 14;
|
|
21
21
|
const HEADER_WITHOUT_CRC_SIZE = 12;
|
|
22
22
|
|
|
23
|
-
const FIELD_DEFAULT_SCALE = 1;
|
|
24
|
-
const FIELD_DEFAULT_OFFSET = 0;
|
|
25
|
-
|
|
26
23
|
/**
|
|
27
24
|
* A class for encoding FIT files.
|
|
28
25
|
* @class
|
|
@@ -131,7 +128,7 @@ class Encoder {
|
|
|
131
128
|
throw new Error("addDeveloperField() - one or more developerDataIndex values are null.", {
|
|
132
129
|
cause: {
|
|
133
130
|
key,
|
|
134
|
-
developerDataIdMesg,
|
|
131
|
+
developerDataIdMesg,
|
|
135
132
|
fieldDescriptionMesg
|
|
136
133
|
}
|
|
137
134
|
});
|
|
@@ -141,7 +138,7 @@ class Encoder {
|
|
|
141
138
|
throw new Error("addDeveloperField() - developerDataIndex values do not match.", {
|
|
142
139
|
cause: {
|
|
143
140
|
key,
|
|
144
|
-
developerDataIdMesg,
|
|
141
|
+
developerDataIdMesg,
|
|
145
142
|
fieldDescriptionMesg
|
|
146
143
|
}
|
|
147
144
|
});
|
|
@@ -215,12 +212,10 @@ class Encoder {
|
|
|
215
212
|
throw new Error();
|
|
216
213
|
}
|
|
217
214
|
|
|
218
|
-
const
|
|
219
|
-
const offset = fieldDefinition.components.length > 1 ? FIELD_DEFAULT_OFFSET : fieldDefinition.offset;
|
|
220
|
-
const hasScaleOrOffset = (scale != FIELD_DEFAULT_SCALE || offset != FIELD_DEFAULT_OFFSET);
|
|
215
|
+
const hasScaleOrOffset = (fieldDefinition.scale != FIT.FIELD_DEFAULT_SCALE || fieldDefinition.offset != FIT.FIELD_DEFAULT_OFFSET);
|
|
221
216
|
|
|
222
217
|
if (hasScaleOrOffset) {
|
|
223
|
-
const scaledValue = (value + offset) * scale;
|
|
218
|
+
const scaledValue = (value + fieldDefinition.offset) * fieldDefinition.scale;
|
|
224
219
|
|
|
225
220
|
return FIT.FloatingPointFieldTypes.includes(fieldDefinition.type) ? scaledValue : Math.round(scaledValue);
|
|
226
221
|
}
|
package/src/fit.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
|
@@ -172,6 +172,8 @@ export default {
|
|
|
172
172
|
isNumberStringDateOrBoolean,
|
|
173
173
|
isNotNumberStringDateOrBoolean,
|
|
174
174
|
MAX_FIELD_SIZE: 255,
|
|
175
|
+
FIELD_DEFAULT_SCALE: 1,
|
|
176
|
+
FIELD_DEFAULT_OFFSET: 0,
|
|
175
177
|
MESG_DEFINITION_MASK: 0x40,
|
|
176
178
|
LOCAL_MESG_NUM_MASK: 0x0F,
|
|
177
179
|
ARCH_LITTLE_ENDIAN: 0x00,
|
package/src/index.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/mesg-definition.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
|
@@ -56,14 +56,20 @@ class MesgDefinition {
|
|
|
56
56
|
const baseType = FIT.FieldTypeToBaseType[fieldProfile[1].baseType];
|
|
57
57
|
const baseTypeDef = FIT.BaseTypeDefinitions[baseType];
|
|
58
58
|
|
|
59
|
+
let scale = fieldProfile[1].components.length > 1 ? FIT.FIELD_DEFAULT_SCALE : fieldProfile[1].scale;
|
|
60
|
+
let offset = fieldProfile[1].components.length > 1 ? FIT.FIELD_DEFAULT_OFFSET : fieldProfile[1].offset;
|
|
61
|
+
|
|
62
|
+
scale = Array.isArray(scale) ? scale[0] : scale ?? FIT.FIELD_DEFAULT_SCALE;
|
|
63
|
+
offset = Array.isArray(offset) ? offset[0] : offset ?? FIT.FIELD_DEFAULT_OFFSET;
|
|
64
|
+
|
|
59
65
|
this.fieldDefinitions.push({
|
|
60
66
|
name: fieldName,
|
|
61
67
|
num: fieldProfile[1].num,
|
|
62
68
|
size: this.#fieldSize(mesg[fieldName], baseTypeDef),
|
|
63
69
|
baseType: baseType,
|
|
64
70
|
type: fieldProfile[1].type,
|
|
65
|
-
scale
|
|
66
|
-
offset
|
|
71
|
+
scale,
|
|
72
|
+
offset,
|
|
67
73
|
components: fieldProfile[1].components,
|
|
68
74
|
});
|
|
69
75
|
});
|
package/src/output-stream.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/profile.js
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
const Profile = {
|
|
14
14
|
version: {
|
|
15
15
|
major: 21,
|
|
16
|
-
minor:
|
|
16
|
+
minor: 178,
|
|
17
17
|
patch: 0,
|
|
18
18
|
type: "Release"
|
|
19
19
|
},
|
|
@@ -22980,6 +22980,95 @@ const Profile = {
|
|
|
22980
22980
|
subFields: []
|
|
22981
22981
|
},
|
|
22982
22982
|
},
|
|
22983
|
+
},
|
|
22984
|
+
470: {
|
|
22985
|
+
num: 470,
|
|
22986
|
+
name: "sleepDisruptionSeverityPeriod",
|
|
22987
|
+
messagesKey: "sleepDisruptionSeverityPeriodMesgs",
|
|
22988
|
+
fields: {
|
|
22989
|
+
254: {
|
|
22990
|
+
num: 254,
|
|
22991
|
+
name: "messageIndex",
|
|
22992
|
+
type: "messageIndex",
|
|
22993
|
+
baseType: "uint16",
|
|
22994
|
+
array: false,
|
|
22995
|
+
scale: 1,
|
|
22996
|
+
offset: 0,
|
|
22997
|
+
units: "",
|
|
22998
|
+
bits: [],
|
|
22999
|
+
components: [],
|
|
23000
|
+
isAccumulated: false,
|
|
23001
|
+
hasComponents: false,
|
|
23002
|
+
subFields: []
|
|
23003
|
+
},
|
|
23004
|
+
253: {
|
|
23005
|
+
num: 253,
|
|
23006
|
+
name: "timestamp",
|
|
23007
|
+
type: "dateTime",
|
|
23008
|
+
baseType: "uint32",
|
|
23009
|
+
array: false,
|
|
23010
|
+
scale: 1,
|
|
23011
|
+
offset: 0,
|
|
23012
|
+
units: "",
|
|
23013
|
+
bits: [],
|
|
23014
|
+
components: [],
|
|
23015
|
+
isAccumulated: false,
|
|
23016
|
+
hasComponents: false,
|
|
23017
|
+
subFields: []
|
|
23018
|
+
},
|
|
23019
|
+
0: {
|
|
23020
|
+
num: 0,
|
|
23021
|
+
name: "severity",
|
|
23022
|
+
type: "sleepDisruptionSeverity",
|
|
23023
|
+
baseType: "enum",
|
|
23024
|
+
array: false,
|
|
23025
|
+
scale: 1,
|
|
23026
|
+
offset: 0,
|
|
23027
|
+
units: "",
|
|
23028
|
+
bits: [],
|
|
23029
|
+
components: [],
|
|
23030
|
+
isAccumulated: false,
|
|
23031
|
+
hasComponents: false,
|
|
23032
|
+
subFields: []
|
|
23033
|
+
},
|
|
23034
|
+
},
|
|
23035
|
+
},
|
|
23036
|
+
471: {
|
|
23037
|
+
num: 471,
|
|
23038
|
+
name: "sleepDisruptionOvernightSeverity",
|
|
23039
|
+
messagesKey: "sleepDisruptionOvernightSeverityMesgs",
|
|
23040
|
+
fields: {
|
|
23041
|
+
253: {
|
|
23042
|
+
num: 253,
|
|
23043
|
+
name: "timestamp",
|
|
23044
|
+
type: "dateTime",
|
|
23045
|
+
baseType: "uint32",
|
|
23046
|
+
array: false,
|
|
23047
|
+
scale: 1,
|
|
23048
|
+
offset: 0,
|
|
23049
|
+
units: "",
|
|
23050
|
+
bits: [],
|
|
23051
|
+
components: [],
|
|
23052
|
+
isAccumulated: false,
|
|
23053
|
+
hasComponents: false,
|
|
23054
|
+
subFields: []
|
|
23055
|
+
},
|
|
23056
|
+
0: {
|
|
23057
|
+
num: 0,
|
|
23058
|
+
name: "severity",
|
|
23059
|
+
type: "sleepDisruptionSeverity",
|
|
23060
|
+
baseType: "enum",
|
|
23061
|
+
array: false,
|
|
23062
|
+
scale: 1,
|
|
23063
|
+
offset: 0,
|
|
23064
|
+
units: "",
|
|
23065
|
+
bits: [],
|
|
23066
|
+
components: [],
|
|
23067
|
+
isAccumulated: false,
|
|
23068
|
+
hasComponents: false,
|
|
23069
|
+
subFields: []
|
|
23070
|
+
},
|
|
23071
|
+
},
|
|
22983
23072
|
},
|
|
22984
23073
|
398: {
|
|
22985
23074
|
num: 398,
|
|
@@ -23216,6 +23305,8 @@ types: {
|
|
|
23216
23305
|
393: "diveApneaAlarm",
|
|
23217
23306
|
398: "skinTempOvernight",
|
|
23218
23307
|
409: "hsaWristTemperatureData", // Message number for the HSA wrist temperature data message
|
|
23308
|
+
470: "sleepDisruptionSeverityPeriod",
|
|
23309
|
+
471: "sleepDisruptionOvernightSeverity",
|
|
23219
23310
|
0xFF00: "mfgRangeMin", // 0xFF00 - 0xFFFE reserved for manufacturer specific messages
|
|
23220
23311
|
0xFFFE: "mfgRangeMax", // 0xFF00 - 0xFFFE reserved for manufacturer specific messages
|
|
23221
23312
|
},
|
|
@@ -24271,6 +24362,7 @@ types: {
|
|
|
24271
24362
|
333: "tektroRacingProducts",
|
|
24272
24363
|
334: "daradInnovationCorporation",
|
|
24273
24364
|
335: "cycloptim",
|
|
24365
|
+
337: "runna",
|
|
24274
24366
|
5759: "actigraphcorp",
|
|
24275
24367
|
},
|
|
24276
24368
|
garminProduct: {
|
|
@@ -24716,7 +24808,11 @@ types: {
|
|
|
24716
24808
|
4586: "instinct3Amoled45mm",
|
|
24717
24809
|
4587: "instinct3Amoled50mm",
|
|
24718
24810
|
4588: "descentG2",
|
|
24811
|
+
4603: "venuX1",
|
|
24812
|
+
4606: "hrm200",
|
|
24813
|
+
4625: "vivoactive6",
|
|
24719
24814
|
4647: "approachS44",
|
|
24815
|
+
4655: "edgeMtb",
|
|
24720
24816
|
4656: "approachS50",
|
|
24721
24817
|
4666: "fenixE",
|
|
24722
24818
|
4759: "instinct3Solar50mm",
|
|
@@ -24843,6 +24939,8 @@ types: {
|
|
|
24843
24939
|
4: "drill",
|
|
24844
24940
|
5: "mixed",
|
|
24845
24941
|
6: "im", // IM is a mixed interval containing the same number of lengths for each of: Butterfly, Backstroke, Breaststroke, Freestyle, swam in that order.
|
|
24942
|
+
7: "imByRound", // For repeated workout steps, a new individual medly stroke is used for each round.
|
|
24943
|
+
8: "rimo", // Reverse IM Order
|
|
24846
24944
|
},
|
|
24847
24945
|
activityType: {
|
|
24848
24946
|
0: "generic",
|
|
@@ -27752,6 +27850,12 @@ types: {
|
|
|
27752
27850
|
2: "threatApproaching",
|
|
27753
27851
|
3: "threatApproachingFast",
|
|
27754
27852
|
},
|
|
27853
|
+
sleepDisruptionSeverity: {
|
|
27854
|
+
0: "none",
|
|
27855
|
+
1: "low",
|
|
27856
|
+
2: "medium",
|
|
27857
|
+
3: "high",
|
|
27858
|
+
},
|
|
27755
27859
|
maxMetSpeedSource: {
|
|
27756
27860
|
0: "onboardGps",
|
|
27757
27861
|
1: "connectedGps",
|
|
@@ -27893,6 +27997,8 @@ MesgNum : {
|
|
|
27893
27997
|
TANK_UPDATE: 319,
|
|
27894
27998
|
TANK_SUMMARY: 323,
|
|
27895
27999
|
SLEEP_ASSESSMENT: 346,
|
|
28000
|
+
SLEEP_DISRUPTION_SEVERITY_PERIOD: 470,
|
|
28001
|
+
SLEEP_DISRUPTION_OVERNIGHT_SEVERITY: 471,
|
|
27896
28002
|
SKIN_TEMP_OVERNIGHT: 398,
|
|
27897
28003
|
PAD: 105,
|
|
27898
28004
|
}
|
package/src/stream.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/utils-hr-mesg.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/utils-internal.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/utils-memo-glob.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
import Profile from "./profile.js";
|
package/src/utils.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.178.0Release
|
|
9
|
+
// Tag = production/release/21.178.0-0-g3bea629
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|