brilliantsole 0.0.45 → 0.0.48
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/build/brilliantsole.cjs +21 -2
- package/build/brilliantsole.cjs.map +1 -1
- package/build/brilliantsole.module.d.ts +20 -20
- package/build/brilliantsole.module.min.d.ts +20 -20
- package/build/brilliantsole.node.module.d.ts +12 -12
- package/build/brilliantsole.node.module.js +21 -2
- package/build/brilliantsole.node.module.js.map +1 -1
- package/package.json +1 -1
- package/src/connection/bluetooth/NobleConnectionManager.ts +26 -3
package/build/brilliantsole.cjs
CHANGED
|
@@ -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;
|
|
@@ -13581,7 +13584,15 @@ class NobleConnectionManager extends BluetoothConnectionManager {
|
|
|
13581
13584
|
async onNoblePeripheralConnect(noblePeripheral) {
|
|
13582
13585
|
_console$6.log("onNoblePeripheralConnect", noblePeripheral.id, noblePeripheral.state);
|
|
13583
13586
|
if (noblePeripheral.state == "connected") {
|
|
13584
|
-
|
|
13587
|
+
_console$6.log("discoverServicesAsync", noblePeripheral.id, {
|
|
13588
|
+
allServiceUUIDs,
|
|
13589
|
+
});
|
|
13590
|
+
if (filterUUIDs) {
|
|
13591
|
+
await this.#noblePeripheral.discoverServicesAsync(allServiceUUIDs);
|
|
13592
|
+
}
|
|
13593
|
+
else {
|
|
13594
|
+
await this.#noblePeripheral.discoverServicesAsync();
|
|
13595
|
+
}
|
|
13585
13596
|
}
|
|
13586
13597
|
await this.#onNoblePeripheralState();
|
|
13587
13598
|
}
|
|
@@ -13640,6 +13651,14 @@ class NobleConnectionManager extends BluetoothConnectionManager {
|
|
|
13640
13651
|
for (const index in services) {
|
|
13641
13652
|
const service = services[index];
|
|
13642
13653
|
_console$6.log("service", service.uuid);
|
|
13654
|
+
if (service.uuid == "1800") {
|
|
13655
|
+
_console$6.log("skipping 1800");
|
|
13656
|
+
continue;
|
|
13657
|
+
}
|
|
13658
|
+
if (service.uuid == "1801") {
|
|
13659
|
+
_console$6.log("skipping 1801");
|
|
13660
|
+
continue;
|
|
13661
|
+
}
|
|
13643
13662
|
const serviceName = getServiceNameFromUUID(service.uuid);
|
|
13644
13663
|
_console$6.assertWithError(serviceName, `no name found for service uuid "${service.uuid}"`);
|
|
13645
13664
|
_console$6.log({ serviceName });
|