diff --git a/docs/WeDo2SmartHub.html b/docs/WeDo2SmartHub.html index 8cac2c1..1560e02 100644 --- a/docs/WeDo2SmartHub.html +++ b/docs/WeDo2SmartHub.html @@ -4148,7 +4148,7 @@
@@ -4310,7 +4310,7 @@ @@ -4619,7 +4619,7 @@ @@ -4781,7 +4781,7 @@ @@ -4967,7 +4967,7 @@ diff --git a/docs/classes.list.html b/docs/classes.list.html index a9a0736..5907464 100644 --- a/docs/classes.list.html +++ b/docs/classes.list.html @@ -5783,7 +5783,7 @@ @@ -5945,7 +5945,7 @@ @@ -6254,7 +6254,7 @@ @@ -6416,7 +6416,7 @@ @@ -6602,7 +6602,7 @@ diff --git a/docs/hub.js.html b/docs/hub.js.html index 1ab8d27..29de908 100644 --- a/docs/hub.js.html +++ b/docs/hub.js.html @@ -121,8 +121,8 @@ class Hub extends events_1.EventEmitter { // NK: This hack allows LPF2.0 hubs to send a second advertisement packet consisting of the hub name before we try to read it setTimeout(() => { this._name = peripheral.advertisement.localName; - this.emit("ready"); - }, 200); + this.emit("discoverComplete"); + }, 500); } /** * @readonly diff --git a/docs/poweredup.js.html b/docs/poweredup.js.html index 215328e..0ba7cd1 100644 --- a/docs/poweredup.js.html +++ b/docs/poweredup.js.html @@ -207,18 +207,18 @@ class PoweredUP extends events_1.EventEmitter { if (!utils_1.isBrowserContext) { startScanning(); } - hub.on("connect", () => { - debug(`Hub ${hub.uuid} connected`); - this._connectedHubs[hub.uuid] = hub; - }); - hub.on("disconnect", () => { - debug(`Hub ${hub.uuid} disconnected`); - delete this._connectedHubs[hub.uuid]; - if (wantScan) { - startScanning(); - } - }); - hub.on("ready", () => { + hub.on("discoverComplete", () => { + hub.on("connect", () => { + debug(`Hub ${hub.uuid} connected`); + this._connectedHubs[hub.uuid] = hub; + }); + hub.on("disconnect", () => { + debug(`Hub ${hub.uuid} disconnected`); + delete this._connectedHubs[hub.uuid]; + if (wantScan) { + startScanning(); + } + }); debug(`Hub ${hub.uuid} discovered`); /** * Emits when a Powered UP Hub device is found. diff --git a/docs/quicksearch.html b/docs/quicksearch.html index aeeb487..4721751 100644 --- a/docs/quicksearch.html +++ b/docs/quicksearch.html @@ -7,7 +7,7 @@