From d706a42b1be673a16bc607f2e128ac0f1d9afc8c Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Thu, 8 Aug 2024 13:38:56 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=B8=85=E7=90=86]=E5=88=A0=E9=99=A4=E5=87=A0?= =?UTF-8?q?=E5=A4=84=E6=89=93=E5=8D=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- third_party/balisecodec/conv.go | 4 ++-- third_party/balisecodec/decode.go | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/third_party/balisecodec/conv.go b/third_party/balisecodec/conv.go index ff28142..43a9e13 100644 --- a/third_party/balisecodec/conv.go +++ b/third_party/balisecodec/conv.go @@ -176,9 +176,9 @@ func ToValLeftMsb(v []byte) uint16 { } val := uint16(0) l := len(v) - elems := make([]string, l) + //elems := make([]string, l) for i := 0; i < l; i++ { - elems[i] = fmt.Sprintf("%d", v[i]) + //elems[i] = fmt.Sprintf("%d", v[i]) if v[i] == 1 { val += (1 << (l - i - 1)) } diff --git a/third_party/balisecodec/decode.go b/third_party/balisecodec/decode.go index e4547bc..c362a62 100644 --- a/third_party/balisecodec/decode.go +++ b/third_party/balisecodec/decode.go @@ -14,16 +14,16 @@ func revertFirst10Bits(b []byte) []byte { w10s := make([]uint16, 83) for i := 0; i < 83; i++ { w10s[i] = uint16(ToValLeftMsb(b[i*10 : i*10+10])) - // 打印输出 - for j := 0; j < 10; j++ { - fmt.Printf("%01b", b[i*10+j]) - } - print(" ") - if i != 0 && i%10 == 9 { - println() - } + //// 打印输出 + //for j := 0; j < 10; j++ { + // fmt.Printf("%01b", b[i*10+j]) + //} + //print(" ") + //if i != 0 && i%10 == 9 { + // println() + //} } - println() + //println() // 将除了第一个10位字整数求和 sum := uint64(0) for i := 1; i < 83; i++ {