brilliantsole 0.0.45 → 0.0.46

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.
@@ -14,8 +14,8 @@ require('svgson');
14
14
  require('svg-pathdata');
15
15
  var webbluetooth = require('webbluetooth');
16
16
  var dgram = require('dgram');
17
- var noble = require('@abandonware/noble');
18
17
  var os = require('os');
18
+ var noble = require('@abandonware/noble');
19
19
 
20
20
  function _interopNamespaceDefault(e) {
21
21
  var n = Object.create(null);
@@ -13490,6 +13490,9 @@ class BaseScanner {
13490
13490
  _a$1 = BaseScanner;
13491
13491
 
13492
13492
  const _console$6 = createConsole("NobleConnectionManager", { log: false });
13493
+ let filterUUIDs = true;
13494
+ const isLinux = os.platform() == "linux";
13495
+ filterUUIDs = !isLinux;
13493
13496
  class NobleConnectionManager extends BluetoothConnectionManager {
13494
13497
  get bluetoothId() {
13495
13498
  return this.#noblePeripheral.id;
@@ -13512,7 +13515,9 @@ class NobleConnectionManager extends BluetoothConnectionManager {
13512
13515
  if (!canConnect) {
13513
13516
  return false;
13514
13517
  }
13518
+ console.log("FUCK");
13515
13519
  await this.#noblePeripheral.connectAsync();
13520
+ console.log("YEA");
13516
13521
  return true;
13517
13522
  }
13518
13523
  async disconnect() {
@@ -13581,7 +13586,15 @@ class NobleConnectionManager extends BluetoothConnectionManager {
13581
13586
  async onNoblePeripheralConnect(noblePeripheral) {
13582
13587
  _console$6.log("onNoblePeripheralConnect", noblePeripheral.id, noblePeripheral.state);
13583
13588
  if (noblePeripheral.state == "connected") {
13584
- await this.#noblePeripheral.discoverServicesAsync(allServiceUUIDs);
13589
+ _console$6.log("discoverServicesAsync", noblePeripheral.id, {
13590
+ allServiceUUIDs,
13591
+ });
13592
+ if (filterUUIDs) {
13593
+ await this.#noblePeripheral.discoverServicesAsync(allServiceUUIDs);
13594
+ }
13595
+ else {
13596
+ await this.#noblePeripheral.discoverServicesAsync();
13597
+ }
13585
13598
  }
13586
13599
  await this.#onNoblePeripheralState();
13587
13600
  }
@@ -13640,6 +13653,14 @@ class NobleConnectionManager extends BluetoothConnectionManager {
13640
13653
  for (const index in services) {
13641
13654
  const service = services[index];
13642
13655
  _console$6.log("service", service.uuid);
13656
+ if (service.uuid == "1800") {
13657
+ _console$6.log("skipping 1800");
13658
+ continue;
13659
+ }
13660
+ if (service.uuid == "1801") {
13661
+ _console$6.log("skipping 1801");
13662
+ continue;
13663
+ }
13643
13664
  const serviceName = getServiceNameFromUUID(service.uuid);
13644
13665
  _console$6.assertWithError(serviceName, `no name found for service uuid "${service.uuid}"`);
13645
13666
  _console$6.log({ serviceName });