From 2bd95f3c5bcc9b68db4e43fcd6a9252f00b0f131 Mon Sep 17 00:00:00 2001 From: Yunhorn <dp.s@yunhorn.com> Date: Wed, 20 Dec 2023 09:54:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'decoder.txt'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- decoder.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/decoder.txt b/decoder.txt index 4552e19..ba9dfb0 100644 --- a/decoder.txt +++ b/decoder.txt @@ -27,5 +27,19 @@ function Decode(fPort, data, variables) { } ]; } + else if (fPort === 1) { + + if (bytes[0] === 0x56) { + return [ + { + mtm_code_1: bytes[1], + mtm_code_2: bytes[2], + HW_Version: "HW:"+bytes[3], + SW_Version:"SW"+bytes[4]+":"+bytes[5]+":"+bytes[6]+":"+bytes[7], + } + ]; + } + } } +