From 03e79267f8d96a9e0e0227047e4242ce46e5bb8b Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Sat, 22 Jan 2022 13:59:04 +0100 Subject: [PATCH] fix issue wrong Payload in TTNv3 #844 --- src/TTN/packed_decoder.js | 2 +- src/TTNv3/packed_decodeUplink.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TTN/packed_decoder.js b/src/TTN/packed_decoder.js index f338e6df..93aefd04 100644 --- a/src/TTN/packed_decoder.js +++ b/src/TTN/packed_decoder.js @@ -45,7 +45,7 @@ function Decoder(bytes, port) { if (port === 3) { // device config data - return decode(bytes, [uint8, uint8, int16, uint8, uint8, uint8, uint8, bitmap1, bitmap2, version], ['loradr', 'txpower', 'rssilimit', 'sendcycle', 'wifichancycle', 'blescantime', 'rgblum', 'flags', 'payloadmask', 'version']); + return decode(bytes, [uint8, uint8, int16, uint8, uint8, uint8, uint8, bitmap2, version], ['loradr', 'txpower', 'rssilimit', 'sendcycle', 'wifichancycle', 'blescantime', 'rgblum', 'payloadmask', 'version']); } if (port === 4) { diff --git a/src/TTNv3/packed_decodeUplink.js b/src/TTNv3/packed_decodeUplink.js index a010f3dc..388d8f0e 100644 --- a/src/TTNv3/packed_decodeUplink.js +++ b/src/TTNv3/packed_decodeUplink.js @@ -53,7 +53,7 @@ function decodeUplink(input) { if (input.fPort === 3) { // device config data - data = decode(input.bytes, [uint8, uint8, int16, uint8, uint8, uint8, uint8, bitmap1, bitmap2, version], ['loradr', 'txpower', 'rssilimit', 'sendcycle', 'wifichancycle', 'blescantime', 'rgblum', 'flags', 'payloadmask', 'version']); + data = decode(input.bytes, [uint8, uint8, int16, uint8, uint8, uint8, uint8, bitmap2, version], ['loradr', 'txpower', 'rssilimit', 'sendcycle', 'wifichancycle', 'blescantime', 'rgblum', 'payloadmask', 'version']); } if (input.fPort === 4) {