@garmin/fitsdk 21.195.0 → 21.200.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 CHANGED
@@ -6,7 +6,7 @@ Share your knowledge, ask questions, and get the latest FIT SDK news in the [FIT
6
6
  ## FIT JavaScript SDK Requirements
7
7
  The FIT JavaScript SDK uses ECMAScript module syntax and requires Node.js v14.0 or higher, or a browser with a compatible JavaScript runtime engine.
8
8
  ## Install
9
- The FIT JavaScript SDK is published as a NodeJS Pacakge on npm as [@garmin/fitsdk](https://www.npmjs.com/package/@garmin/fitsdk) and can be installed with the npm cli.
9
+ The FIT JavaScript SDK is published as a NodeJS Package on npm as [@garmin/fitsdk](https://www.npmjs.com/package/@garmin/fitsdk) and can be installed with the npm cli.
10
10
 
11
11
  ```sh
12
12
  npm install @garmin/fitsdk
@@ -47,7 +47,7 @@ All valid FIT files should include a 12 or 14 byte file header. The 14 byte head
47
47
  00000020: 02 02 84 05 02 84 00 01 00 00 19 28 7E C5 95 B0 ...........(~E.0
48
48
  ````
49
49
 
50
- 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
+ The isFIT method reads the file header and returns true if bytes 8–11 are equal to the ASCII values ".FIT". isFIT provides a quick way to check that the file is a FIT file before attempting to decode the file.
51
51
 
52
52
  The Decoder class includes a static and instance version of the isFIT method.
53
53
 
@@ -62,9 +62,9 @@ The checkIntegrity method performs three checks on a FIT file:
62
62
  A file must pass all three of these tests to be considered a valid FIT file. See the [IsFIT(), CheckIntegrity(), and Read() Methods recipe](/fit/cookbook/isfit-checkintegrity-read/) for use-cases where the checkIntegrity method should be used and cases when it might be better to avoid it.
63
63
 
64
64
  ### Read Method
65
- The Read method decodes all message from the input stream and returns an object containing an array of errors encountered during the decoding and a dictionary of decoded messages grouped by message type. Any exceptions encountered during decoding will be caught by the Read method and added to the array of errors.
65
+ The Read method decodes all messages from the input stream and returns an object containing an array of errors encountered during the decoding and a dictionary of decoded messages grouped by message type. Any exceptions encountered during decoding will be caught by the Read method and added to the array of errors.
66
66
 
67
- The Read method accepts an optional options object that can be used to customize how field data is represented in the decoded messages. All options are enabled by default. Disabling options may speed up file decoding. Options may also be enabled or disable based on how the decoded data will be used.
67
+ The Read method accepts an optional options object that can be used to customize how field data is represented in the decoded messages. All options are enabled by default. Disabling options may speed up file decoding. Options may also be enabled or disabled based on how the decoded data will be used.
68
68
 
69
69
  ````js
70
70
  const { messages, errors } = decoder.read({
@@ -77,14 +77,14 @@ const { messages, errors } = decoder.read({
77
77
  convertTypesToStrings: true,
78
78
  convertDateTimesToDates: true,
79
79
  includeUnknownData: false,
80
- mergeHeartRates: true
80
+ mergeHeartRates: true,
81
81
  decodeMemoGlobs: false,
82
82
  skipHeader: false,
83
83
  dataOnly: false,
84
84
  });
85
85
  ````
86
86
  #### mesgListener = (messageNumber, message) => {}
87
- 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.
87
+ 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 will be returned from the Read method in the messages dictionary.
88
88
 
89
89
  Example mesgListener callback that tracks the field names across all Record messages.
90
90
  ````js
@@ -97,13 +97,13 @@ const onMesg = (messageNumber, message) => {
97
97
  }
98
98
 
99
99
  const { messages, errors } = decoder.read({
100
- mesgListener = onMesg
100
+ mesgListener: onMesg
101
101
  });
102
102
 
103
103
  console.log(recordFields);
104
104
  ````
105
105
  #### mesgDefinitionListener: (mesgDefinition) => {}
106
- Optional callback function that can be used to inspect message defintions as they are decoded from the file.
106
+ Optional callback function that can be used to inspect message definitions as they are decoded from the file.
107
107
  #### fieldDescriptionListener: (key, developerDataIdMesg, fieldDescriptionMesg) => {}
108
108
  Optional callback function that can be used to inspect developer field descriptions as they are decoded from the file.
109
109
  #### applyScaleAndOffset: true | false
@@ -194,7 +194,7 @@ When true, the decoder will read past the 14-byte header and ignore its contents
194
194
  When true, the decoder will read the file as if the 14-byte header was not written. The decoder then assumes the file begins with a message definition and assumes file data size from the size of the file's stream.
195
195
 
196
196
  ## Creating Streams
197
- 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.
197
+ Stream objects contain the binary FIT data to be decoded. Stream objects can be created from byte-arrays, ArrayBuffers, and Node.js Buffers. Internally the Stream class uses an ArrayBuffer to manage the byte stream.
198
198
  #### From a Byte Array
199
199
  ````js
200
200
  const streamFromByteArray = Stream.fromByteArray([0x0E, 0x10, 0xD9, 0x07, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x46, 0x49, 0x54, 0x91, 0x33, 0x00, 0x00]);
@@ -230,7 +230,7 @@ The FIT_EPOCH_MS value can be used to convert FIT Epoch values to JavaScript Dat
230
230
  const jsDate = new Date(fitDateTime * 1000 + Utils.FIT_EPOCH_MS);
231
231
  ````
232
232
  ### convertDateTimeToDate Method
233
- A convince method for converting FIT Epoch values to JavaScript Date objects.
233
+ A convenience method for converting FIT Epoch values to JavaScript Date objects.
234
234
  ````js
235
235
  const jsDate = Utils.convertDateTimeToDate(fitDateTime);
236
236
  ````
@@ -295,4 +295,4 @@ import * as fs from "fs";
295
295
  fs.writeFileSync("example.fit", uint8Array);
296
296
 
297
297
  ````
298
- 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.
298
+ 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 using the FIT JavaScript SDK.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@garmin/fitsdk",
3
- "version": "21.195.0",
3
+ "version": "21.200.0",
4
4
  "description": "FIT JavaScript SDK",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -12,7 +12,7 @@
12
12
  "license": "SEE LICENSE IN LICENSE.txt",
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "https://github.com/garmin/fit-javascript-sdk"
15
+ "url": "git+https://github.com/garmin/fit-javascript-sdk.git"
16
16
  },
17
17
  "files": [
18
18
  "src/"
@@ -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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -223,4 +223,5 @@ export default {
223
223
  LOCAL_MESG_NUM_MASK: 0x0F,
224
224
  ARCH_LITTLE_ENDIAN: 0x00,
225
225
  DEV_DATA_MASK: 0x20,
226
+ NULL_TERMINATOR: "\0",
226
227
  };
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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -102,6 +102,12 @@ class MesgDefinition {
102
102
  })) {
103
103
  throw new Error(`Some field sizes are greater than ${FIT.MAX_FIELD_SIZE}`, { cause: this.fieldDefinitions, });
104
104
  }
105
+
106
+ this.developerFieldDefinitions.forEach((developerFieldDefinition) => {
107
+ if (developerFieldDefinition.size > FIT.MAX_FIELD_SIZE) {
108
+ throw new Error(`Developer field size for key '${developerFieldDefinition.key}' is greater than ${FIT.MAX_FIELD_SIZE}`, { cause: developerFieldDefinition, });
109
+ }
110
+ });
105
111
  }
106
112
  catch (error) {
107
113
  throw new Error(
@@ -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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -131,6 +131,8 @@ class OutputStream {
131
131
  }
132
132
 
133
133
  writeString(text) {
134
+ text = Array.isArray(text) ? text.join(FIT.NULL_TERMINATOR) : text;
135
+
134
136
  const bytes = this.#textEncoder.encode(text);
135
137
 
136
138
  this.#resizeIfNeeded(bytes.byteLength);
@@ -141,7 +143,7 @@ class OutputStream {
141
143
  this.#byteOffset += bytes.byteLength;
142
144
 
143
145
  // Add a null terminator
144
- this.writeUInt8(0);
146
+ this.writeUInt8(FIT.NULL_TERMINATOR);
145
147
 
146
148
  return this;
147
149
  }
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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
13
13
  const Profile = {
14
14
  version: {
15
15
  major: 21,
16
- minor: 195,
16
+ minor: 200,
17
17
  patch: 0,
18
18
  type: "Release"
19
19
  },
@@ -23084,6 +23084,163 @@ const Profile = {
23084
23084
  subFields: []
23085
23085
  },
23086
23086
  },
23087
+ },
23088
+ 412: {
23089
+ num: 412,
23090
+ name: "napEvent",
23091
+ messagesKey: "napEventMesgs",
23092
+ fields: {
23093
+ 254: {
23094
+ num: 254,
23095
+ name: "messageIndex",
23096
+ type: "messageIndex",
23097
+ baseType: "uint16",
23098
+ array: false,
23099
+ scale: 1,
23100
+ offset: 0,
23101
+ units: "",
23102
+ bits: [],
23103
+ components: [],
23104
+ isAccumulated: false,
23105
+ hasComponents: false,
23106
+ subFields: []
23107
+ },
23108
+ 253: {
23109
+ num: 253,
23110
+ name: "timestamp",
23111
+ type: "dateTime",
23112
+ baseType: "uint32",
23113
+ array: false,
23114
+ scale: 1,
23115
+ offset: 0,
23116
+ units: "",
23117
+ bits: [],
23118
+ components: [],
23119
+ isAccumulated: false,
23120
+ hasComponents: false,
23121
+ subFields: []
23122
+ },
23123
+ 0: {
23124
+ num: 0,
23125
+ name: "startTime",
23126
+ type: "dateTime",
23127
+ baseType: "uint32",
23128
+ array: false,
23129
+ scale: 1,
23130
+ offset: 0,
23131
+ units: "seconds",
23132
+ bits: [],
23133
+ components: [],
23134
+ isAccumulated: false,
23135
+ hasComponents: false,
23136
+ subFields: []
23137
+ },
23138
+ 1: {
23139
+ num: 1,
23140
+ name: "startTimezoneOffset",
23141
+ type: "sint16",
23142
+ baseType: "sint16",
23143
+ array: false,
23144
+ scale: 1,
23145
+ offset: 0,
23146
+ units: "minutes",
23147
+ bits: [],
23148
+ components: [],
23149
+ isAccumulated: false,
23150
+ hasComponents: false,
23151
+ subFields: []
23152
+ },
23153
+ 2: {
23154
+ num: 2,
23155
+ name: "endTime",
23156
+ type: "dateTime",
23157
+ baseType: "uint32",
23158
+ array: false,
23159
+ scale: 1,
23160
+ offset: 0,
23161
+ units: "seconds",
23162
+ bits: [],
23163
+ components: [],
23164
+ isAccumulated: false,
23165
+ hasComponents: false,
23166
+ subFields: []
23167
+ },
23168
+ 3: {
23169
+ num: 3,
23170
+ name: "endTimezoneOffset",
23171
+ type: "sint16",
23172
+ baseType: "sint16",
23173
+ array: false,
23174
+ scale: 1,
23175
+ offset: 0,
23176
+ units: "minutes",
23177
+ bits: [],
23178
+ components: [],
23179
+ isAccumulated: false,
23180
+ hasComponents: false,
23181
+ subFields: []
23182
+ },
23183
+ 4: {
23184
+ num: 4,
23185
+ name: "feedback",
23186
+ type: "napPeriodFeedback",
23187
+ baseType: "enum",
23188
+ array: false,
23189
+ scale: 1,
23190
+ offset: 0,
23191
+ units: "",
23192
+ bits: [],
23193
+ components: [],
23194
+ isAccumulated: false,
23195
+ hasComponents: false,
23196
+ subFields: []
23197
+ },
23198
+ 5: {
23199
+ num: 5,
23200
+ name: "isDeleted",
23201
+ type: "bool",
23202
+ baseType: "enum",
23203
+ array: false,
23204
+ scale: 1,
23205
+ offset: 0,
23206
+ units: "",
23207
+ bits: [],
23208
+ components: [],
23209
+ isAccumulated: false,
23210
+ hasComponents: false,
23211
+ subFields: []
23212
+ },
23213
+ 6: {
23214
+ num: 6,
23215
+ name: "source",
23216
+ type: "napSource",
23217
+ baseType: "enum",
23218
+ array: false,
23219
+ scale: 1,
23220
+ offset: 0,
23221
+ units: "",
23222
+ bits: [],
23223
+ components: [],
23224
+ isAccumulated: false,
23225
+ hasComponents: false,
23226
+ subFields: []
23227
+ },
23228
+ 7: {
23229
+ num: 7, // The timestamp representing when this nap event was last updated
23230
+ name: "updateTimestamp",
23231
+ type: "dateTime",
23232
+ baseType: "uint32",
23233
+ array: false,
23234
+ scale: 1,
23235
+ offset: 0,
23236
+ units: "",
23237
+ bits: [],
23238
+ components: [],
23239
+ isAccumulated: false,
23240
+ hasComponents: false,
23241
+ subFields: []
23242
+ },
23243
+ },
23087
23244
  },
23088
23245
  398: {
23089
23246
  num: 398,
@@ -23320,6 +23477,7 @@ types: {
23320
23477
  393: "diveApneaAlarm",
23321
23478
  398: "skinTempOvernight",
23322
23479
  409: "hsaWristTemperatureData", // Message number for the HSA wrist temperature data message
23480
+ 412: "napEvent",
23323
23481
  470: "sleepDisruptionSeverityPeriod",
23324
23482
  471: "sleepDisruptionOvernightSeverity",
23325
23483
  0xFF00: "mfgRangeMin", // 0xFF00 - 0xFFFE reserved for manufacturer specific messages
@@ -23669,12 +23827,18 @@ types: {
23669
23827
  48: "floorClimbing",
23670
23828
  49: "baseball",
23671
23829
  53: "diving",
23830
+ 56: "shooting", // Sport Shooting bits, set here for sport_bits alignment
23831
+ 58: "winterSport",
23832
+ 59: "grinding", // Sailing position, operating manual winches to power boat controls
23672
23833
  62: "hiit",
23834
+ 63: "videoGaming",
23673
23835
  64: "racket",
23674
23836
  65: "wheelchairPushWalk",
23675
23837
  66: "wheelchairPushRun",
23676
23838
  67: "meditation",
23839
+ 68: "paraSport",
23677
23840
  69: "discGolf",
23841
+ 70: "teamSport",
23678
23842
  71: "cricket",
23679
23843
  72: "rugby",
23680
23844
  73: "hockey",
@@ -23682,10 +23846,17 @@ types: {
23682
23846
  75: "volleyball",
23683
23847
  76: "waterTubing",
23684
23848
  77: "wakesurfing",
23849
+ 78: "waterSport",
23850
+ 79: "archery",
23685
23851
  80: "mixedMartialArts",
23852
+ 81: "motorSports",
23686
23853
  82: "snorkeling",
23687
23854
  83: "dance",
23688
23855
  84: "jumpRope",
23856
+ 85: "poolApnea",
23857
+ 86: "mobility",
23858
+ 87: "geocaching",
23859
+ 88: "canoeing",
23689
23860
  254: "all", // All is for goals only to include all sports.
23690
23861
  },
23691
23862
  sportBits0: {
@@ -23813,23 +23984,40 @@ types: {
23813
23984
  58: "virtualActivity",
23814
23985
  59: "obstacle", // Used for events where participants run, crawl through mud, climb over walls, etc.
23815
23986
  62: "breathing",
23987
+ 63: "ccrDiving", // Diving w/ closed circuit rebreather
23816
23988
  65: "sailRace", // Sailing
23989
+ 66: "expedition", // Generic
23817
23990
  67: "ultra", // Ultramarathon
23818
23991
  68: "indoorClimbing", // Climbing
23819
23992
  69: "bouldering", // Climbing
23820
23993
  70: "hiit", // High Intensity Interval Training
23994
+ 71: "indoorGrinding", // Sailing position, operating manual winches to power boat controls
23995
+ 72: "huntingWithDogs", // Hunting
23821
23996
  73: "amrap", // HIIT
23822
23997
  74: "emom", // HIIT
23823
23998
  75: "tabata", // HIIT
23999
+ 77: "esport", // Video Gaming, Cycling, etc.
24000
+ 78: "triathlon", // Multisport
24001
+ 79: "duathlon", // Multisport
24002
+ 80: "brick", // Multisport
24003
+ 81: "swimRun", // Multisport
24004
+ 82: "adventureRace", // Multisport
24005
+ 83: "truckerWorkout", // DEZL trucker workout training sport
23824
24006
  84: "pickleball", // Racket
23825
24007
  85: "padel", // Racket
23826
24008
  86: "indoorWheelchairWalk",
23827
24009
  87: "indoorWheelchairRun",
23828
24010
  88: "indoorHandCycling",
23829
- 94: "squash",
23830
- 95: "badminton",
23831
- 96: "racquetball",
23832
- 97: "tableTennis",
24011
+ 90: "field", // Hockey
24012
+ 91: "ice", // Hockey
24013
+ 92: "ultimate", // Disc
24014
+ 93: "platform", // Racket
24015
+ 94: "squash", // Racket
24016
+ 95: "badminton", // Racket
24017
+ 96: "racquetball", // Racket
24018
+ 97: "tableTennis", // Racket
24019
+ 98: "overland",
24020
+ 99: "trollingMotor", // Generic
23833
24021
  110: "flyCanopy", // Flying
23834
24022
  111: "flyParaglide", // Flying
23835
24023
  112: "flyParamotor", // Flying
@@ -23840,6 +24028,12 @@ types: {
23840
24028
  117: "flyWx", // Flying
23841
24029
  118: "flyVfr", // Flying
23842
24030
  119: "flyIfr", // Flying
24031
+ 121: "dynamicApnea",
24032
+ 123: "enduro", // Cycling
24033
+ 124: "rucking", // Hiking
24034
+ 125: "rally", // Motor sports
24035
+ 126: "poolTriathlon", // Multisport
24036
+ 127: "eBikeEnduro", // Cycling
23843
24037
  254: "all",
23844
24038
  },
23845
24039
  sportEvent: {
@@ -24383,6 +24577,10 @@ types: {
24383
24577
  341: "carv",
24384
24578
  342: "tissot",
24385
24579
  345: "realVelo",
24580
+ 346: "wetech",
24581
+ 347: "jespr",
24582
+ 348: "huawei",
24583
+ 349: "gotoes",
24386
24584
  5759: "actigraphcorp",
24387
24585
  },
24388
24586
  garminProduct: {
@@ -27887,6 +28085,31 @@ types: {
27887
28085
  2: "medium",
27888
28086
  3: "high",
27889
28087
  },
28088
+ napPeriodFeedback: {
28089
+ 0: "none",
28090
+ 1: "multipleNapsDuringDay",
28091
+ 2: "jetlagIdealTimingIdealDuration",
28092
+ 3: "jetlagIdealTimingLongDuration",
28093
+ 4: "jetlagLateTimingIdealDuration",
28094
+ 5: "jetlagLateTimingLongDuration",
28095
+ 6: "idealTimingIdealDurationLowNeed",
28096
+ 7: "idealTimingIdealDurationHighNeed",
28097
+ 8: "idealTimingLongDurationLowNeed",
28098
+ 9: "idealTimingLongDurationHighNeed",
28099
+ 10: "lateTimingIdealDurationLowNeed",
28100
+ 11: "lateTimingIdealDurationHighNeed",
28101
+ 12: "lateTimingLongDurationLowNeed",
28102
+ 13: "lateTimingLongDurationHighNeed",
28103
+ 14: "idealDurationLowNeed",
28104
+ 15: "idealDurationHighNeed",
28105
+ 16: "longDurationLowNeed",
28106
+ 17: "longDurationHighNeed",
28107
+ },
28108
+ napSource: {
28109
+ 0: "automatic",
28110
+ 1: "manualDevice",
28111
+ 2: "manualGc",
28112
+ },
27890
28113
  maxMetSpeedSource: {
27891
28114
  0: "onboardGps",
27892
28115
  1: "connectedGps",
@@ -28030,6 +28253,7 @@ MesgNum : {
28030
28253
  SLEEP_ASSESSMENT: 346,
28031
28254
  SLEEP_DISRUPTION_SEVERITY_PERIOD: 470,
28032
28255
  SLEEP_DISRUPTION_OVERNIGHT_SEVERITY: 471,
28256
+ NAP_EVENT: 412,
28033
28257
  SKIN_TEMP_OVERNIGHT: 398,
28034
28258
  PAD: 105,
28035
28259
  }
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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -176,7 +176,7 @@ class Stream {
176
176
 
177
177
  if (baseType === FIT.BaseType.STRING) {
178
178
  const string = this.#textDecoder.decode(bytes).replace(/\uFFFD/g, "");
179
- const strings = string.split('\0');
179
+ const strings = string.split(FIT.NULL_TERMINATOR);
180
180
 
181
181
  while (strings[strings.length - 1] === "") {
182
182
  strings.pop();
@@ -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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
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.195.0Release
9
- // Tag = production/release/21.195.0-0-g569e7e5
8
+ // Profile Version = 21.200.0Release
9
+ // Tag = production/release/21.200.0-0-g28b5705d
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12