fit-file-parser 2.2.3 → 2.2.4

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/dist/binary.js CHANGED
@@ -84,6 +84,10 @@ function readData(blob, fDef, startIndex, options) {
84
84
  }
85
85
  return temp;
86
86
  }
87
+ if (fDef.type === 'sint8') {
88
+ const val = blob[startIndex];
89
+ return val > 127 ? val - 256 : val;
90
+ }
87
91
  return blob[startIndex];
88
92
  }
89
93
  function formatByType(data, type, scale, offset) {
@@ -90,6 +90,10 @@ function readData(blob, fDef, startIndex, options) {
90
90
  }
91
91
  return temp;
92
92
  }
93
+ if (fDef.type === 'sint8') {
94
+ const val = blob[startIndex];
95
+ return val > 127 ? val - 256 : val;
96
+ }
93
97
  return blob[startIndex];
94
98
  }
95
99
  function formatByType(data, type, scale, offset) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fit-file-parser",
3
3
  "type": "module",
4
- "version": "2.2.3",
4
+ "version": "2.2.4",
5
5
  "private": false,
6
6
  "description": "Parse your .FIT files easily, directly from JS (Garmin, Polar, Suunto)",
7
7
  "author": {