From 21e4ff1a669dbdebe943ae649403574db62dd7c5 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Thu, 25 Nov 2021 01:10:49 +0100 Subject: [PATCH] Removing frameCheckSequence from packets --- src/streamHandler/PacketStreamFactory.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/streamHandler/PacketStreamFactory.js b/src/streamHandler/PacketStreamFactory.js index ee66562..2d64183 100644 --- a/src/streamHandler/PacketStreamFactory.js +++ b/src/streamHandler/PacketStreamFactory.js @@ -115,6 +115,7 @@ class PacketStreamFactory extends Transform{ // Get payload-Hex-Data. If there is no data: empty packet.payloadData = hexConv.hexToBytes(data.match(/(?<=\s)([A-F0-9]{1,4}(?=\s))/igm)?.join('') ?? ''); + packet.payloadData.splice(packet.payloadData.length-4, 4); // Remove FrameCheck sequence // Cover special cases with more data let newPacket;