incyclist-devices 2.3.2 → 2.3.5
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.
|
@@ -57,9 +57,8 @@ class AntAdapter extends adpater_1.default {
|
|
|
57
57
|
this.capabilities = this.getStaticCapabilities();
|
|
58
58
|
}
|
|
59
59
|
getProfileName() {
|
|
60
|
-
var _a;
|
|
61
60
|
const C = this.constructor;
|
|
62
|
-
return
|
|
61
|
+
return C['ANT_PROFILE_NAME'];
|
|
63
62
|
}
|
|
64
63
|
getLegacyProfileName() {
|
|
65
64
|
const C = this.constructor;
|
|
@@ -331,6 +331,7 @@ class AntInterface extends events_1.default {
|
|
|
331
331
|
}
|
|
332
332
|
startSensor(sensor, onDeviceData) {
|
|
333
333
|
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
+
var _a;
|
|
334
335
|
if (!this.isConnected()) {
|
|
335
336
|
const connected = yield this.connect();
|
|
336
337
|
if (!connected)
|
|
@@ -355,6 +356,7 @@ class AntInterface extends events_1.default {
|
|
|
355
356
|
this.logEvent({ message: 'could not start sensor' });
|
|
356
357
|
channel.off('data', onData);
|
|
357
358
|
}
|
|
359
|
+
this.logEvent({ message: 'sensor started', channel: (_a = sensor.getChannel()) === null || _a === void 0 ? void 0 : _a.getChannelNo(), profile: sensor.getProfile(), deviceID: sensor.getDeviceID() });
|
|
358
360
|
return started;
|
|
359
361
|
}
|
|
360
362
|
catch (err) {
|
|
@@ -363,7 +365,7 @@ class AntInterface extends events_1.default {
|
|
|
363
365
|
try {
|
|
364
366
|
yield channel.stopSensor(sensor);
|
|
365
367
|
}
|
|
366
|
-
catch (
|
|
368
|
+
catch (_b) { }
|
|
367
369
|
this.unblockChannel(channel);
|
|
368
370
|
return false;
|
|
369
371
|
}
|
|
@@ -383,7 +385,7 @@ class AntInterface extends events_1.default {
|
|
|
383
385
|
return true;
|
|
384
386
|
}
|
|
385
387
|
const channel = sensor.getChannel();
|
|
386
|
-
if (channel !== undefined) {
|
|
388
|
+
if (channel !== undefined && channel !== null) {
|
|
387
389
|
try {
|
|
388
390
|
if (!channel.flush) {
|
|
389
391
|
this.logEvent({ message: 'old version of ant-channel detected' });
|