incyclist-devices 1.4.91 → 1.4.92

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.
@@ -345,9 +345,9 @@ class WahooAdvancedFitnessMachineDevice extends fm_1.default {
345
345
  s = -100;
346
346
  if (s > 100)
347
347
  s = 100;
348
- const slopeVal = Math.min(Math.floor(327.68 * s), 32767);
348
+ const slopeVal = Math.min(Math.round((1 + s / 100) * 65535 / 2.0), 65535);
349
349
  const data = Buffer.alloc(2);
350
- data.writeInt16LE(slopeVal, 0);
350
+ data.writeUInt16LE(slopeVal, 0);
351
351
  const res = yield this.writeWahooFtmsMessage(70, data);
352
352
  return res;
353
353
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incyclist-devices",
3
- "version": "1.4.91",
3
+ "version": "1.4.92",
4
4
  "dependencies": {
5
5
  "@serialport/parser-byte-length": "^9.0.1",
6
6
  "@serialport/parser-delimiter": "^9.0.1",