-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from WildernessLabs/develop
Merge to main for RC2-2
- Loading branch information
Showing
18 changed files
with
195 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Meadow.Foundation.Sensors.Gnss; | ||
using Meadow.Hardware; | ||
|
||
namespace Meadow.Foundation.mikroBUS.Sensors.Gnss | ||
{ | ||
/// <summary> | ||
/// Represents a mikroBUS GNSS 5 board (Neo M8) | ||
/// </summary> | ||
public class CGNSS5 : NeoM8 | ||
{ | ||
/// <summary> | ||
/// Creates a new CGNSS5 object using serial | ||
/// </summary> | ||
public CGNSS5(IMeadowDevice device, SerialPortName serialPortName, IPin resetPin, IPin ppsPin = null) | ||
: base(device, serialPortName, resetPin, ppsPin) | ||
{ } | ||
|
||
/// <summary> | ||
/// Creates a new CGNSS5 object using I2C | ||
/// </summary> | ||
public CGNSS5(II2cBus i2cBus, IPin resetPin, IPin ppsPin = null) | ||
: base(i2cBus, (byte)Addresses.Default, resetPin: resetPin, ppsPin: ppsPin) | ||
{ } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<Project Sdk="Meadow.Sdk/1.1.0"> | ||
<PropertyGroup> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<PackageIcon>icon.png</PackageIcon> | ||
<Authors>Wilderness Labs, Inc</Authors> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
<OutputType>Library</OutputType> | ||
<AssemblyName>CGNSS5</AssemblyName> | ||
<Company>Wilderness Labs, Inc</Company> | ||
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/</PackageProjectUrl> | ||
<PackageId>Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS5</PackageId> | ||
<RepositoryUrl>https://github.com/WildernessLabs/Meadow.Foundation</RepositoryUrl> | ||
<PackageTags>Meadow,Meadow.Foundation,MikroBus,Mikroe,MikroElectronika,GPS,GNSS,Click,5</PackageTags> | ||
<Version>0.1.0</Version> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<Description>MikroElectronika Serial I2C Neo M8 GPS / GNSS 5 MikroBus click board</Description> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="..\..\icon.png" Pack="true" PackagePath="" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Meadow.Foundation.Sensors.Gnss.NeoM8" Version="0.*" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project Sdk="Meadow.Sdk/1.1.0"> | ||
<PropertyGroup> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||
<OutputType>Library</OutputType> | ||
<AssemblyName>App</AssemblyName> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Meadow.F7" Version="0.*" /> | ||
<ProjectReference Include="..\..\Driver\CGNSS5.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
using Meadow; | ||
using Meadow.Devices; | ||
using Meadow.Foundation.mikroBUS.Sensors.Gnss; | ||
using Meadow.Peripherals.Sensors.Location.Gnss; | ||
using System.Threading.Tasks; | ||
|
||
namespace CGNSS5_Sample | ||
{ | ||
// Change F7FeatherV2 to F7FeatherV1 for V1.x boards | ||
public class MeadowApp : App<F7FeatherV2> | ||
{ | ||
//<!=SNIP=> | ||
|
||
CGNSS5 gps; | ||
|
||
public override Task Initialize() | ||
{ | ||
Resolver.Log.Info("Initializing ..."); | ||
|
||
//gps = new CGNSS5(Device.PlatformOS.GetSerialPortName("COM1"), Device.Pins.D09, Device.Pins.D11); | ||
|
||
gps = new CGNSS5(Device.CreateI2cBus(), resetPin: Device.Pins.D09, ppsPin: Device.Pins.D11); | ||
|
||
gps.GgaReceived += (object sender, GnssPositionInfo location) => | ||
{ | ||
Resolver.Log.Info("*********************************************"); | ||
Resolver.Log.Info($"{location}"); | ||
Resolver.Log.Info("*********************************************"); | ||
}; | ||
// GLL | ||
gps.GllReceived += (object sender, GnssPositionInfo location) => | ||
{ | ||
Resolver.Log.Info("*********************************************"); | ||
Resolver.Log.Info($"{location}"); | ||
Resolver.Log.Info("*********************************************"); | ||
}; | ||
// GSA | ||
gps.GsaReceived += (object sender, ActiveSatellites activeSatellites) => | ||
{ | ||
Resolver.Log.Info("*********************************************"); | ||
Resolver.Log.Info($"{activeSatellites}"); | ||
Resolver.Log.Info("*********************************************"); | ||
}; | ||
// RMC (recommended minimum) | ||
gps.RmcReceived += (object sender, GnssPositionInfo positionCourseAndTime) => | ||
{ | ||
Resolver.Log.Info("*********************************************"); | ||
Resolver.Log.Info($"{positionCourseAndTime}"); | ||
Resolver.Log.Info("*********************************************"); | ||
}; | ||
// VTG (course made good) | ||
gps.VtgReceived += (object sender, CourseOverGround courseAndVelocity) => | ||
{ | ||
Resolver.Log.Info("*********************************************"); | ||
Resolver.Log.Info($"{courseAndVelocity}"); | ||
Resolver.Log.Info("*********************************************"); | ||
}; | ||
// GSV (satellites in view) | ||
gps.GsvReceived += (object sender, SatellitesInView satellites) => | ||
{ | ||
Resolver.Log.Info("*********************************************"); | ||
Resolver.Log.Info($"{satellites}"); | ||
Resolver.Log.Info("*********************************************"); | ||
}; | ||
|
||
return Task.CompletedTask; | ||
} | ||
|
||
public override Task Run() | ||
{ | ||
gps.StartUpdating(); | ||
|
||
return Task.CompletedTask; | ||
} | ||
|
||
//<!=SNOP=> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters