incyclist-devices 1.4.71 → 1.4.72
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 -1
- package/package.json +1 -1
package/lib/ble/wahoo-kickr.js
CHANGED
|
@@ -267,8 +267,9 @@ class WahooAdvancedFitnessMachineDevice extends fm_1.default {
|
|
|
267
267
|
setSimGrade(slope) {
|
|
268
268
|
return __awaiter(this, void 0, void 0, function* () {
|
|
269
269
|
const value = (Math.min(1, Math.max(-1, slope)) + 1.0) * 65535 / 2.0;
|
|
270
|
+
const slopeVal = Math.floor(value);
|
|
270
271
|
const data = Buffer.alloc(2);
|
|
271
|
-
data.writeInt16LE(
|
|
272
|
+
data.writeInt16LE(slopeVal, 0);
|
|
272
273
|
const res = yield this.writeWahooFtmsMessage(70, data);
|
|
273
274
|
return res;
|
|
274
275
|
});
|