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]));
|
this.send(Buffer.from([0x21, this.portId, 0x00]));
|
||||||
}
|
}
|
||||||
finish(message) {
|
finish(message) {
|
||||||
|
if ((message & 0x10) === 0x10)
|
||||||
|
return; // "busy/full"
|
||||||
this._busy = (message & 0x01) === 0x01;
|
this._busy = (message & 0x01) === 0x01;
|
||||||
while (this._finishedCallbacks.length > Number(this._busy)) {
|
while (this._finishedCallbacks.length > Number(this._busy)) {
|
||||||
const callback = this._finishedCallbacks.shift();
|
const callback = this._finishedCallbacks.shift();
|
||||||
|
@ -410,10 +410,11 @@ class LPF2Hub extends basehub_1.BaseHub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
_parsePortAction(message) {
|
_parsePortAction(message) {
|
||||||
const portId = message[3];
|
for (let offset = 3; offset < message.length; offset += 2) {
|
||||||
const device = this._getDeviceByPortId(portId);
|
const device = this._getDeviceByPortId(message[offset]);
|
||||||
if (device) {
|
if (device) {
|
||||||
device.finish(message[4]);
|
device.finish(message[offset + 1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_parseSensorMessage(message) {
|
_parseSensorMessage(message) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user