diff --git a/src/lpf2hub.ts b/src/lpf2hub.ts index a23a533..57daac0 100644 --- a/src/lpf2hub.ts +++ b/src/lpf2hub.ts @@ -41,6 +41,20 @@ export class LPF2Hub extends Hub { } + /** + * Shutdown the Hub. + * @method LPF2Hub#shutdown + * @returns {Promise} Resolved upon successful disconnect. + */ + public shutdown () { + return new Promise((resolve, reject) => { + this._writeMessage(Consts.BLECharacteristic.LPF2_ALL, Buffer.from([0x02, 0x01]), () => { + return resolve(); + }); + }); + } + + /** * Set the name of the Hub. * @method LPF2Hub#setName diff --git a/src/poweredup.ts b/src/poweredup.ts index a5c6327..8d38d45 100644 --- a/src/poweredup.ts +++ b/src/poweredup.ts @@ -162,7 +162,6 @@ export class PoweredUP extends EventEmitter { */ this.emit("discover", hub); -} - + } }