Added shutdown method for LPF2 hubs
This commit is contained in:
parent
cdb2562d20
commit
40cd244086
@ -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
|
||||
|
@ -162,7 +162,6 @@ export class PoweredUP extends EventEmitter {
|
||||
*/
|
||||
this.emit("discover", hub);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user