incyclist-devices 2.3.4 → 2.3.6
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;
|
package/lib/ble/base/adapter.js
CHANGED
|
@@ -294,6 +294,7 @@ class BleAdapter extends adpater_1.default {
|
|
|
294
294
|
if (wasPaused)
|
|
295
295
|
this.resume();
|
|
296
296
|
if (!this.isStarting()) {
|
|
297
|
+
this.logEvent({ message: 'start result: interrupted', device: this.getName(), interface: this.getInterface(), protocol: this.getProtocolName() });
|
|
297
298
|
this.started = false;
|
|
298
299
|
this.stopped = true;
|
|
299
300
|
return false;
|
|
@@ -247,6 +247,14 @@ class BleInterface extends events_1.default {
|
|
|
247
247
|
}
|
|
248
248
|
reconnect() {
|
|
249
249
|
return __awaiter(this, void 0, void 0, function* () {
|
|
250
|
+
let error;
|
|
251
|
+
try {
|
|
252
|
+
throw new Error('');
|
|
253
|
+
}
|
|
254
|
+
catch (err) {
|
|
255
|
+
error = err;
|
|
256
|
+
}
|
|
257
|
+
this.logEvent({ message: 'reconnecting interface', stack: error.stack });
|
|
250
258
|
yield this.disconnect();
|
|
251
259
|
yield this.connect(true);
|
|
252
260
|
});
|
package/lib/ble/fm/adapter.js
CHANGED
|
@@ -213,6 +213,8 @@ class BleFmAdapter extends adapter_1.default {
|
|
|
213
213
|
return __awaiter(this, arguments, void 0, function* (request, enforced = false) {
|
|
214
214
|
if (!enforced && (this.paused || !this.device))
|
|
215
215
|
return;
|
|
216
|
+
if (!enforced && (this.stopped && !this.isStarting()))
|
|
217
|
+
return;
|
|
216
218
|
try {
|
|
217
219
|
const update = this.getCyclingMode().sendBikeUpdate(request);
|
|
218
220
|
this.logEvent({ message: 'send bike update requested', profile: this.getProfile(), update, request });
|