mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2026-04-21 06:13:58 +00:00
.Net6 (#112)
* Added .NET 6 support * fix constants * Upgrade Android sample app to .net6.0 * Fix build warnings and update android sample * Change baseline version * Fix build * Delete unused code * Update CIBuild.yml * Update CIBuild.yml * Update CIBuild.yml * Update CIBuild.yml * Update CIBuild.yml * Update CIBuild.yml * Update CIBuild.yml * Update CIBuild.yml * Update expired certificate * Set min versions * Fix api build * Fix build warnings and update doc builds * update metadata * tweak readme * Use net8 for ios/android * Fix target frameworks for sample apps * Fix UWP build * update tfm * Update to v3.0 and remove out of support frameworks * Add BT device to net6-windows * Add MAUI sample and delete Android * Clean up * Update github action dependency to supported version * Update certificate * Update certificate * Fix RMC FixTime parsing that can lose sub-second precision with doubles (#117) * Extract local variables for the parameters of DateTimeOffset * Add seconds to FixTime as Ticks in order to preserve sub-second precision that can get lost by using doubles --------- Co-authored-by: Justin King <justin.king@vibrationresearch.com> * Cleanup of fix and add unit test to verify --------- Co-authored-by: Morten Nielsen <mort5161@esri.com> Co-authored-by: Justin King <56605940+justinswork@users.noreply.github.com> Co-authored-by: Justin King <justin.king@vibrationresearch.com>
This commit is contained in:
parent
91d0a73cd2
commit
db04b280e4
85 changed files with 5080 additions and 1201 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="MSBuild.Sdk.Extras/3.0.22">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
|
||||
<TargetFrameworks>net472;net6.0;net7.0;net8.0</TargetFrameworks>
|
||||
<IsPackable>false</IsPackable>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<PackageCertificateKeyFile>NmeaParser.Tests.UWP_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion>
|
||||
<PackageCertificateThumbprint>7210C91F7513F71AF99FFB1DCC89A664B2421F61</PackageCertificateThumbprint>
|
||||
<PackageCertificateThumbprint>C614C475413F0F200721D37C69BBA017D3F9FA5D</PackageCertificateThumbprint>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -31,14 +31,14 @@ namespace NmeaParser.Tests
|
|||
{
|
||||
[TestMethod]
|
||||
public
|
||||
#if NETFX_CORE
|
||||
#if WINDOWS_UWP
|
||||
async Task
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
ParseNmeaFile()
|
||||
{
|
||||
#if NETFX_CORE
|
||||
#if WINDOWS_UWP
|
||||
var file = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///NmeaSampleData.txt"));
|
||||
System.IO.StreamReader reader = new System.IO.StreamReader(await file.OpenStreamForReadAsync());
|
||||
#else
|
||||
|
|
@ -64,14 +64,14 @@ namespace NmeaParser.Tests
|
|||
}
|
||||
[TestMethod]
|
||||
public
|
||||
#if NETFX_CORE
|
||||
#if WINDOWS_UWP
|
||||
async Task
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
ParseTrimbleR2NmeaFile()
|
||||
{
|
||||
#if NETFX_CORE
|
||||
#if WINDOWS_UWP
|
||||
var file = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///TrimbleR2SampleData.txt"));
|
||||
System.IO.StreamReader reader = new System.IO.StreamReader(await file.OpenStreamForReadAsync());
|
||||
#else
|
||||
|
|
@ -209,6 +209,19 @@ namespace NmeaParser.Tests
|
|||
Assert.AreEqual(0.019, rmc.Speed);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[WorkItem(116)]
|
||||
public void TestGprmc_DateCheck()
|
||||
{
|
||||
// Tests a behavior change in TimeSpan.AddSeconds introduced in .NET 7
|
||||
string input = "$GPRMC,141825.2,A,4249.92297,N,08548.52186,W,000.01,227.1,040322,005.5,W*54";
|
||||
var msg = NmeaMessage.Parse(input);
|
||||
Assert.IsInstanceOfType(msg, typeof(Rmc));
|
||||
Rmc rmc = (Rmc)msg;
|
||||
Assert.AreEqual("GPRMC", rmc.MessageType);
|
||||
Assert.AreEqual(new DateTimeOffset(2022, 3, 4, 14, 18, 25, 200, TimeSpan.Zero), rmc.FixTime);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestGpgga()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue