incyclist-devices 1.4.57 → 1.4.58
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/ble-interface.js +6 -0
- package/package.json +1 -1
package/lib/ble/ble-interface.js
CHANGED
|
@@ -527,8 +527,14 @@ class BleInterface extends ble_1.BleInterfaceClass {
|
|
|
527
527
|
const onPeripheralFound = (peripheral, fromCache = false) => __awaiter(this, void 0, void 0, function* () {
|
|
528
528
|
if (fromCache)
|
|
529
529
|
this.logEvent({ message: 'adding from Cache', peripheral: peripheral.address });
|
|
530
|
+
else {
|
|
531
|
+
const { id, name, address } = peripheral;
|
|
532
|
+
this.logEvent({ message: 'BLE scan: found device', peripheral: { id, name, address } });
|
|
533
|
+
}
|
|
530
534
|
if (!peripheral || !peripheral.advertisement || !peripheral.advertisement.serviceUuids || peripheral.advertisement.serviceUuids.length === 0)
|
|
531
535
|
return;
|
|
536
|
+
if (peripheral.address === undefined || peripheral.address === '')
|
|
537
|
+
peripheral.address = peripheral.id;
|
|
532
538
|
const isPeripheralProcessed = peripheralsProcessed.find(p => p === peripheral.address) !== undefined;
|
|
533
539
|
if (isPeripheralProcessed)
|
|
534
540
|
return;
|