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) {