Updated docs
This commit is contained in:
parent
32fe39fd8c
commit
57ee61e620
@ -248,6 +248,8 @@ class Device extends events_1.EventEmitter {
|
||||
this.send(Buffer.from([0x21, this.portId, 0x00]));
|
||||
}
|
||||
finish(message) {
|
||||
if ((message & 0x10) === 0x10)
|
||||
return; // "busy/full"
|
||||
this._busy = (message & 0x01) === 0x01;
|
||||
while (this._finishedCallbacks.length > Number(this._busy)) {
|
||||
const callback = this._finishedCallbacks.shift();
|
||||
|
@ -410,10 +410,11 @@ class LPF2Hub extends basehub_1.BaseHub {
|
||||
}
|
||||
}
|
||||
_parsePortAction(message) {
|
||||
const portId = message[3];
|
||||
const device = this._getDeviceByPortId(portId);
|
||||
if (device) {
|
||||
device.finish(message[4]);
|
||||
for (let offset = 3; offset < message.length; offset += 2) {
|
||||
const device = this._getDeviceByPortId(message[offset]);
|
||||
if (device) {
|
||||
device.finish(message[offset + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
_parseSensorMessage(message) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user