From ab7a3f5996a31fbb7690f50925520d8c2897a212 Mon Sep 17 00:00:00 2001
From: "SmallChi(Koike)" <564952747@qq.com>
Date: Fri, 25 Mar 2022 20:40:13 +0800
Subject: [PATCH] =?UTF-8?q?v2.2.1=201.=E6=B7=BB=E5=8A=A0sourcelink=202.?=
=?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BD=A6=E8=BE=86=E5=AE=9A=E4=BD=8D=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E8=A7=A3=E6=9E=90=203.=E4=BF=AE=E5=A4=8D0x1504?=
=?UTF-8?q?=E8=BD=A6=E8=BE=86=E8=A1=8C=E9=A9=B6=E8=AE=B0=E5=BD=95=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=204.=E5=8E=BB=E6=8E=89=E8=AF=BB=E5=8F=96BCD=E5=86=85?=
=?UTF-8?q?=E9=83=A8=E5=BF=BD=E7=95=A5=E2=80=980=E2=80=99,=E8=AE=A9?=
=?UTF-8?q?=E5=A4=96=E9=83=A8=E5=8E=BB=E5=A4=84=E7=90=86=205.=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E6=8C=87=E5=AE=9Anet=E7=89=88=E6=9C=AC=E7=BC=96?=
=?UTF-8?q?=E8=AF=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/dotnetcore.yml | 2 +-
global.json | 5 +++++
src/Info.props | 2 +-
.../JT809.Protocol.Extensions.JT1078.Test.csproj | 2 +-
src/JT809.Protocol.Test/JT809.Protocol.Test.csproj | 2 +-
.../JT809SubMessageBody/JT809_0x9500_0x9505Test.cs | 2 +-
src/JT809.Protocol/JT809.Protocol.csproj | 4 ++--
src/JT809.Protocol/MessagePack/JT809MessagePackReader.cs | 3 +--
8 files changed, 13 insertions(+), 9 deletions(-)
create mode 100644 global.json
diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
index b9375a0..ab72470 100644
--- a/.github/workflows/dotnetcore.yml
+++ b/.github/workflows/dotnetcore.yml
@@ -12,7 +12,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@master
with:
- dotnet-version: 6.0.100
+ dotnet-version: 6.0.201
- name: dotnet info
run: dotnet --info
- name: dotnet restore
diff --git a/global.json b/global.json
new file mode 100644
index 0000000..726ce1b
--- /dev/null
+++ b/global.json
@@ -0,0 +1,5 @@
+{
+ "sdk": {
+ "version": "6.0.201"
+ }
+}
\ No newline at end of file
diff --git a/src/Info.props b/src/Info.props
index ff0a445..71abdbe 100644
--- a/src/Info.props
+++ b/src/Info.props
@@ -8,7 +8,7 @@
https://github.com/SmallChi/JT809
https://github.com/SmallChi/JT809/blob/master/LICENSE
https://github.com/SmallChi/JT809/blob/master/LICENSE
- 2.2.1-preview2
+ 2.2.1
LICENSE
true
latest
diff --git a/src/JT809.Protocol.Extensions/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj b/src/JT809.Protocol.Extensions/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj
index 2f4211c..745e11f 100644
--- a/src/JT809.Protocol.Extensions/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj
+++ b/src/JT809.Protocol.Extensions/JT809.Protocol.Extensions.JT1078.Test/JT809.Protocol.Extensions.JT1078.Test.csproj
@@ -6,7 +6,7 @@
-
+
all
diff --git a/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj b/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj
index 176937c..0fa106b 100644
--- a/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj
+++ b/src/JT809.Protocol.Test/JT809.Protocol.Test.csproj
@@ -13,7 +13,7 @@
-
+
all
diff --git a/src/JT809.Protocol.Test/JT809SubMessageBody/JT809_0x9500_0x9505Test.cs b/src/JT809.Protocol.Test/JT809SubMessageBody/JT809_0x9500_0x9505Test.cs
index e3b8b96..c2749e8 100644
--- a/src/JT809.Protocol.Test/JT809SubMessageBody/JT809_0x9500_0x9505Test.cs
+++ b/src/JT809.Protocol.Test/JT809SubMessageBody/JT809_0x9500_0x9505Test.cs
@@ -39,7 +39,7 @@ namespace JT809.Protocol.Test.JT809SubMessageBody
{
var bytes = "00 00 00 00 00 00 00 00 08 08 6A 74 38 30 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 61 64 73 6C 73 6D 61 6C 6C 63 68 69 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 61 64 73 6C 31 32 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 31 32 37 2E 30 2E 30 2E 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 28 03 29 00 00 00 00 5B AC C6 40".ToHexBytes();
JT809_0x9500_0x9505 jT809_0X9500_0X9505 = JT809Serializer.Deserialize(bytes);
- Assert.Equal("808", jT809_0X9500_0X9505.AuthenticationCode);
+ Assert.Equal("00000000000000000808", jT809_0X9500_0X9505.AuthenticationCode);
Assert.Equal("jt808", jT809_0X9500_0X9505.AccessPointName);
Assert.Equal("adslsmallchi", jT809_0X9500_0X9505.UserName);
Assert.Equal("adsl123", jT809_0X9500_0X9505.Password);
diff --git a/src/JT809.Protocol/JT809.Protocol.csproj b/src/JT809.Protocol/JT809.Protocol.csproj
index 4901c73..b3d37d8 100644
--- a/src/JT809.Protocol/JT809.Protocol.csproj
+++ b/src/JT809.Protocol/JT809.Protocol.csproj
@@ -95,13 +95,13 @@
-
+
-
+
diff --git a/src/JT809.Protocol/MessagePack/JT809MessagePackReader.cs b/src/JT809.Protocol/MessagePack/JT809MessagePackReader.cs
index b3be19b..d749264 100644
--- a/src/JT809.Protocol/MessagePack/JT809MessagePackReader.cs
+++ b/src/JT809.Protocol/MessagePack/JT809MessagePackReader.cs
@@ -408,8 +408,7 @@ namespace JT809.Protocol.MessagePack
{
bcdSb.Append(readOnlySpan[i].ToString("X2"));
}
- // todo:对于协议来说这个0是有意义的,下个版本在去掉
- return bcdSb.ToString().TrimStart('0');
+ return bcdSb.ToString();
}
private ReadOnlySpan GetReadOnlySpan(int count)
{