From d5252e9278e0aad260f09b8cab59efc35b3c7dbf Mon Sep 17 00:00:00 2001 From: sparks-alec Date: Mon, 12 Jun 2023 00:59:18 -0400 Subject: [PATCH] ignore Net3 priority packets should make this toggleable eventually, but this is more usable for now --- plugins/sacn/main.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/sacn/main.js b/plugins/sacn/main.js index ed2835d..4274185 100644 --- a/plugins/sacn/main.js +++ b/plugins/sacn/main.js @@ -55,10 +55,7 @@ exports.data = function data(_device, buf) { universe.priority = buf.readUInt8(108); universe.cid = buf.toString('hex', 22, 38); universe.slots = buf.slice(126); - - if (buf.readUInt8(125) !== 0) { - universe.startCode = buf.readUInt8(125); - } + universe.startCode = buf.readUInt8(125); device.data.source = buf.toString('utf8', 44, 108); device.displayName = `${device.data.source} sACN`; @@ -70,12 +67,12 @@ exports.data = function data(_device, buf) { universe.slotElems = []; universe.slotElemsSet = false; - if (universe.priority > 0) { + if (universe.priority > 0 && universe.startCode === 0) { device.draw(); device.update('elementCache'); } } - if (universe.priority > 0) { + if (universe.priority > 0 && universe.startCode === 0) { device.update('universeData', { universeIndex, universe, @@ -115,7 +112,7 @@ exports.update = function update(_device, doc, updateType, updateData) { } else if (data.startCode === 0xcc) { $code.textContent = 'RDM'; } - } else { + } else if (data.universe.startCode === 0) { device.draw(); device.update('elementCache'); }