incyclist-devices 2.4.7 → 2.4.9
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/fm/sensor.js +4 -4
- package/lib/ble/tacx/sensor.js +1 -1
- package/package.json +1 -1
package/lib/ble/fm/sensor.js
CHANGED
|
@@ -295,7 +295,7 @@ class BleFitnessMachineDevice extends sensor_1.TBleSensor {
|
|
|
295
295
|
}
|
|
296
296
|
getFitnessMachineFeatures() {
|
|
297
297
|
return __awaiter(this, void 0, void 0, function* () {
|
|
298
|
-
var _a;
|
|
298
|
+
var _a, _b, _c;
|
|
299
299
|
if (this._features)
|
|
300
300
|
return this._features;
|
|
301
301
|
try {
|
|
@@ -314,8 +314,8 @@ class BleFitnessMachineDevice extends sensor_1.TBleSensor {
|
|
|
314
314
|
|| (targetSettings & consts_2.TargetSettingFeatureFlag.InclinationTargetSettingSupported) !== 0;
|
|
315
315
|
const setPower = (targetSettings & consts_2.TargetSettingFeatureFlag.PowerTargetSettingSupported) !== 0;
|
|
316
316
|
const setResistance = (targetSettings & consts_2.TargetSettingFeatureFlag.ResistanceTargetSettingSupported) !== 0;
|
|
317
|
-
const fmInfo = this.buildFitnessMachineInfo(fitnessMachine);
|
|
318
|
-
const tsInfo = this.buildTargetSettingsInfo(targetSettings);
|
|
317
|
+
const fmInfo = (_b = this.buildFitnessMachineInfo(fitnessMachine)) !== null && _b !== void 0 ? _b : [];
|
|
318
|
+
const tsInfo = (_c = this.buildTargetSettingsInfo(targetSettings)) !== null && _c !== void 0 ? _c : [];
|
|
319
319
|
this._features = { fitnessMachine, targetSettings, power, heartrate, cadence, setPower, setSlope, setResistance };
|
|
320
320
|
this.logEvent({ message: 'supported features', device: this.getName(), fmFeatures: fmInfo.join('|'), tsFeatures: tsInfo.join('|'), features: this._features });
|
|
321
321
|
this._features.fmInfo = fmInfo;
|
|
@@ -391,7 +391,7 @@ class BleFitnessMachineDevice extends sensor_1.TBleSensor {
|
|
|
391
391
|
check(consts_2.TargetSettingFeatureFlag.WheelCircumferenceConfigurationSupported, 'wheelCircumference');
|
|
392
392
|
check(consts_2.TargetSettingFeatureFlag.SpinDownControlSupported, 'spindown');
|
|
393
393
|
check(consts_2.TargetSettingFeatureFlag.TargetedCadenceConfigurationSupported, 'cadence');
|
|
394
|
-
if (this.supportsVirtualShifting) {
|
|
394
|
+
if (this.supportsVirtualShifting()) {
|
|
395
395
|
info.push('virtualShifting');
|
|
396
396
|
}
|
|
397
397
|
}
|
package/lib/ble/tacx/sensor.js
CHANGED
|
@@ -34,7 +34,7 @@ class TacxAdvancedFitnessMachineDevice extends sensor_1.default {
|
|
|
34
34
|
this.data = {};
|
|
35
35
|
}
|
|
36
36
|
getRequiredCharacteristics() {
|
|
37
|
-
return [consts_1.
|
|
37
|
+
return [consts_1.CSP_MEASUREMENT, this.tacxRx];
|
|
38
38
|
}
|
|
39
39
|
onData(characteristic, characteristicData) {
|
|
40
40
|
const data = Buffer.from(characteristicData);
|