incyclist-devices 1.4.96 → 1.4.97

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.
@@ -553,14 +553,14 @@ class BleInterface extends ble_1.BleInterfaceClass {
553
553
  });
554
554
  };
555
555
  const onPeripheralFound = (peripheral, fromCache = false) => __awaiter(this, void 0, void 0, function* () {
556
- if (!peripheral || !peripheral.advertisement || !peripheral.advertisement.localName || !peripheral.advertisement.serviceUuids || peripheral.advertisement.serviceUuids.length === 0)
556
+ if (!peripheral || !peripheral.advertisement || !peripheral.advertisement.localName || !peripheral.advertisement.serviceUuids)
557
557
  return;
558
558
  if (fromCache) {
559
559
  this.logEvent({ message: 'adding from Cache', peripheral: peripheral.address });
560
560
  }
561
561
  else {
562
562
  const { id, name, address, advertisement = {} } = peripheral;
563
- this.logEvent({ message: 'BLE scan: found device', peripheral: { id, name, address, services: advertisement.serviceUuids } });
563
+ this.logEvent({ message: 'BLE scan: found device', peripheral: { id, name: advertisement.localName, address, services: advertisement.serviceUuids } });
564
564
  }
565
565
  if (peripheral.address === undefined || peripheral.address === '')
566
566
  peripheral.address = peripheral.id;
@@ -568,8 +568,10 @@ class BleInterface extends ble_1.BleInterfaceClass {
568
568
  if (isPeripheralProcessed)
569
569
  return;
570
570
  peripheralsProcessed.push(peripheral.address);
571
- const characteristics = yield this.getCharacteristics(peripheral);
571
+ if (scanForDevice && requested.name && requested.name !== peripheral.advertisement.localName)
572
+ return;
572
573
  const connector = this.getConnector(peripheral);
574
+ const characteristics = yield this.getCharacteristics(peripheral);
573
575
  const connectedServices = connector.getServices();
574
576
  const services = connectedServices ? connectedServices.map(cs => cs.uuid) : undefined;
575
577
  const connectedPeripheral = connector.getPeripheral();
@@ -631,7 +633,7 @@ class BleInterface extends ble_1.BleInterfaceClass {
631
633
  });
632
634
  this.logEvent({ message: `${opStr}: start scanning`, requested: scanForDevice ? { name, address, profile } : undefined, timeout });
633
635
  let services = [];
634
- if (scanForDevice) {
636
+ if (scanForDevice && name && !name.toLowerCase().startsWith('tacx')) {
635
637
  if (props.requested instanceof ble_1.BleDeviceClass) {
636
638
  const device = props.requested;
637
639
  services = (device.getServices()) || [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incyclist-devices",
3
- "version": "1.4.96",
3
+ "version": "1.4.97",
4
4
  "dependencies": {
5
5
  "@serialport/parser-byte-length": "^9.0.1",
6
6
  "@serialport/parser-delimiter": "^9.0.1",