From 57ee61e620265b057c7eff311843298dd08fc54e Mon Sep 17 00:00:00 2001 From: Nathan Kellenicki Date: Tue, 18 Jan 2022 17:52:45 -0800 Subject: [PATCH] Updated docs --- docs/devices_device.js.html | 2 ++ docs/hubs_lpf2hub.js.html | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/devices_device.js.html b/docs/devices_device.js.html index 590cfc6..9a151c5 100644 --- a/docs/devices_device.js.html +++ b/docs/devices_device.js.html @@ -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(); diff --git a/docs/hubs_lpf2hub.js.html b/docs/hubs_lpf2hub.js.html index 64b2d36..a0a1e86 100644 --- a/docs/hubs_lpf2hub.js.html +++ b/docs/hubs_lpf2hub.js.html @@ -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) {