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.
- package/lib/ble/wahoo-kickr.js +2 -2
- package/package.json +1 -1
package/lib/ble/wahoo-kickr.js
CHANGED
|
@@ -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.
|
|
348
|
+
const slopeVal = Math.min(Math.round((1 + s / 100) * 65535 / 2.0), 65535);
|
|
349
349
|
const data = Buffer.alloc(2);
|
|
350
|
-
data.
|
|
350
|
+
data.writeUInt16LE(slopeVal, 0);
|
|
351
351
|
const res = yield this.writeWahooFtmsMessage(70, data);
|
|
352
352
|
return res;
|
|
353
353
|
}
|