Added shutdown method for LPF2 hubs

This commit is contained in:
Nathan Kellenicki 2019-01-24 17:04:54 -08:00
parent cdb2562d20
commit 40cd244086
2 changed files with 15 additions and 2 deletions

View File

@ -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

View File

@ -162,7 +162,6 @@ export class PoweredUP extends EventEmitter {
*/
this.emit("discover", hub);
}
}
}