incyclist-devices 2.3.0-beta.14 → 2.3.0-beta.16
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.
|
@@ -370,10 +370,10 @@ class BleInterface extends events_1.default {
|
|
|
370
370
|
return __awaiter(this, void 0, void 0, function* () {
|
|
371
371
|
if (!this.isConnected() || !this.isDiscovering())
|
|
372
372
|
return;
|
|
373
|
+
this.addCompleting(announcement);
|
|
373
374
|
this.logEvent({ message: 'updateWithServices', peripheral: announcement.name });
|
|
374
375
|
try {
|
|
375
|
-
yield this.discoverServices(announcement);
|
|
376
|
-
return announcement;
|
|
376
|
+
announcement.serviceUUIDs = yield this.discoverServices(announcement);
|
|
377
377
|
}
|
|
378
378
|
catch (err) {
|
|
379
379
|
this.logError(err, 'updateWithServices');
|
|
@@ -409,7 +409,7 @@ class BleInterface extends events_1.default {
|
|
|
409
409
|
this.logEvent({ message: 'discover services failed', reason: err.message, device });
|
|
410
410
|
}
|
|
411
411
|
peripheral === null || peripheral === void 0 ? void 0 : peripheral.removeAllListeners();
|
|
412
|
-
return
|
|
412
|
+
return announcement.serviceUUIDs;
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
isScanning() {
|
|
@@ -504,7 +504,7 @@ class BleInterface extends events_1.default {
|
|
|
504
504
|
const expected = this.expectedServices.map(utils_1.parseUUID);
|
|
505
505
|
const supported = (_b = found.filter(uuid => expected.includes(uuid))) !== null && _b !== void 0 ? _b : [];
|
|
506
506
|
if (!supported.length) {
|
|
507
|
-
this.logEvent({ message: '
|
|
507
|
+
this.logEvent({ message: 'peripheral not supported', name: service.name, uuids: service.serviceUUIDs });
|
|
508
508
|
this.addUnsupported(service);
|
|
509
509
|
}
|
|
510
510
|
return supported.length > 0;
|
|
@@ -238,10 +238,10 @@ class DirectConnectInterface extends events_1.default {
|
|
|
238
238
|
this.services[idx] = { ts: Date.now(), service };
|
|
239
239
|
}
|
|
240
240
|
else {
|
|
241
|
-
this.logEvent({ message: 'device announced', device: service.name, announcement: service, source });
|
|
242
241
|
this.services.push({ ts: Date.now(), service });
|
|
243
242
|
if (!((_a = service.serviceUUIDs) === null || _a === void 0 ? void 0 : _a.length))
|
|
244
243
|
return;
|
|
244
|
+
this.logEvent({ message: 'device announced', device: service.name, announcement: service, source });
|
|
245
245
|
this.emitDevice(service);
|
|
246
246
|
(_b = this.matching) === null || _b === void 0 ? void 0 : _b.push(service.name);
|
|
247
247
|
}
|