Added more debug to investigate webbluetooth device attachment issues
This commit is contained in:
parent
e624efd067
commit
59179652dd
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-poweredup",
|
||||
"version": "5.0.1",
|
||||
"version": "5.0.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-poweredup",
|
||||
"version": "5.0.1",
|
||||
"version": "5.0.2",
|
||||
"description": "A Javascript module to interface with LEGO Powered Up components.",
|
||||
"homepage": "https://github.com/nathankellenicki/node-poweredup/",
|
||||
"main": "dist/node/index-node.js",
|
||||
|
@ -146,8 +146,10 @@ export class PoweredUP extends EventEmitter {
|
||||
resolve(Consts.HubType.CONTROL_PLUS_HUB);
|
||||
break;
|
||||
}
|
||||
debug("Hub type determined");
|
||||
});
|
||||
} else {
|
||||
debug("Stashed in mailbox (LPF2_ALL)", message);
|
||||
device.addToCharacteristicMailbox(Consts.BLECharacteristic.LPF2_ALL, message);
|
||||
}
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ export class WebBLEDevice extends EventEmitter implements IBLEDevice {
|
||||
};
|
||||
this._characteristics[uuid].addEventListener("characteristicvaluechanged", this._listeners[uuid]);
|
||||
for (const data of this._mailbox) {
|
||||
debug("Replayed from mailbox (LPF2_ALL)", data);
|
||||
callback(data);
|
||||
}
|
||||
this._mailbox = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user