Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to main for RC2-1 #13

Merged
merged 12 commits into from
Feb 2, 2023
7 changes: 6 additions & 1 deletion Source/C16x9/Driver/C16x9.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ public class C16x9 : IGraphicsDisplay
/// <summary>
/// Color mode of display
/// </summary>
public ColorType ColorMode => ColorType.Format8bppGray;
public ColorMode ColorMode => ColorMode.Format8bppGray;

/// <summary>
/// Color mode of display
/// </summary>
public ColorMode SupportedColorModes => ColorMode.Format8bppGray;

/// <summary>
/// Width of display in pixels
Expand Down
2 changes: 1 addition & 1 deletion Source/C16x9/Driver/C16x9.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<None Include="..\..\icon.png" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Meadow.Foundation.Displays.MicroGraphics" Version="0.*" />
<PackageReference Include="Meadow.Foundation.Graphics.MicroGraphics" Version="0.*" />
<PackageReference Include="Meadow.Foundation.ICs.IOExpanders.Is31fl3731" Version="0.*" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="0.*" />
<PackageReference Include="Meadow.Foundation.mikroBUS.Displays.C16x9" Version="0.*" />
<ProjectReference Include="..\..\Driver\C16x9.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/C8800Retro/Driver/C8800Retro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AssemblyName>C8800Retro</AssemblyName>
<Company>Wilderness Labs, Inc</Company>
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/</PackageProjectUrl>
<PackageId>Meadow.Foundation.mikroBUS.Sensors.Buttons.C8800Retro</PackageId>
<PackageId>Meadow.Foundation.mikroBUS.Displays.C8800Retro</PackageId>
<RepositoryUrl>https://github.com/WildernessLabs/Meadow.Foundation</RepositoryUrl>
<PackageTags>Meadow, Meadow.Foundation, altair, as1115, retro, MikroBus, Mikroe, MikroElectronika, buttons, leds, led driver, keyscan</PackageTags>
<Version>0.1.0</Version>
Expand Down
3 changes: 1 addition & 2 deletions Source/C8x8/Driver/C8x8.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Meadow.Devices;
using Meadow.Foundation.Displays;
using Meadow.Foundation.Displays;
using Meadow.Hardware;

namespace Meadow.Foundation.mikroBUS.Displays
Expand Down
1 change: 0 additions & 1 deletion Source/C8x8/Driver/C8x8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<None Include="..\..\icon.png" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Meadow.Foundation.Displays.MicroGraphics" Version="0.*" />
<PackageReference Include="Meadow.Foundation.Displays.Max7219" Version="0.*" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="0.*" />
<PackageReference Include="Meadow.Foundation.mikroBUS.Displays.C8x8" Version="0.*" />
<ProjectReference Include="..\..\Driver\C8x8.csproj" />
</ItemGroup>
</Project>
3 changes: 1 addition & 2 deletions Source/CButton/Driver/CButton.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Meadow.Devices;
using Meadow.Foundation.Leds;
using Meadow.Foundation.Leds;
using Meadow.Foundation.Sensors.Buttons;
using Meadow.Hardware;
using Meadow.Peripherals.Leds;
Expand Down
2 changes: 1 addition & 1 deletion Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="0.*" />
<PackageReference Include="Meadow.Foundation.mikroBUS.Sensors.Buttons.CButton" Version="0.*" />
<ProjectReference Include="..\..\Driver\CButton.csproj" />
</ItemGroup>
</Project>
18 changes: 18 additions & 0 deletions Source/CGNSS10/Driver/CGNSS10.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Meadow.Foundation.Sensors.Gnss;
using Meadow.Hardware;

namespace Meadow.Foundation.mikroBUS.Sensors.Gnss
{
/// <summary>
/// Represents a mikroBUS GNSS 10 board (Neo M8)
/// </summary>
public class CGNSS10 : NeoM8
{
/// <summary>
/// Creates a new CGNSS10 object
/// </summary>
public CGNSS10(ISpiBus spiBus, IDigitalOutputPort chipSelectPort, IDigitalOutputPort resetPort = null)
: base(spiBus, chipSelectPort, resetPort)
{ }
}
}
24 changes: 24 additions & 0 deletions Source/CGNSS10/Driver/CGNSS10.csproj
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>CGNSS10</AssemblyName>
<Company>Wilderness Labs, Inc</Company>
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/</PackageProjectUrl>
<PackageId>Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS10</PackageId>
<RepositoryUrl>https://github.com/WildernessLabs/Meadow.Foundation</RepositoryUrl>
<PackageTags>Meadow,Meadow.Foundation,MikroBus,Mikroe,MikroElectronika,GPS,GNSS,Click,10</PackageTags>
<Version>0.1.0</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Description>MikroElectronika Serial I2C SPI Neo M8 GPS / GNSS 10 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>
12 changes: 12 additions & 0 deletions Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj
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\CGNSS10.csproj" />
</ItemGroup>
</Project>
77 changes: 77 additions & 0 deletions Source/CGNSS10/Sample/CGNSS10_Sample/MeadowApp.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
using Meadow;
using Meadow.Devices;
using Meadow.Foundation.mikroBUS.Sensors.Gnss;
using Meadow.Peripherals.Sensors.Location.Gnss;
using System.Threading.Tasks;

namespace CGNSS10_Sample
{
// Change F7FeatherV2 to F7FeatherV1 for V1.x boards
public class MeadowApp : App<F7FeatherV2>
{
//<!=SNIP=>

CGNSS10 gps;

public override Task Initialize()
{
Resolver.Log.Info("Initializing ...");

gps = new CGNSS10(Device.CreateSpiBus(), Device.CreateDigitalOutputPort(Device.Pins.D14));

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=>
}
}
16 changes: 13 additions & 3 deletions Source/CJoystick/Driver/CJoystick.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using Meadow.Devices;
using Meadow.Foundation.Sensors.Buttons;
using Meadow.Foundation.Sensors.Buttons;
using Meadow.Foundation.Sensors.Hid;
using Meadow.Hardware;
using Meadow.Peripherals.Sensors;
using Meadow.Peripherals.Sensors.Buttons;
using System;

using System.Threading.Tasks;

namespace Meadow.Foundation.mikroBUS.Sensors.Hid
{
/// <summary>
Expand Down Expand Up @@ -64,5 +65,14 @@ public CJoystick(IMeadowDevice device, IPin tstPin, II2cBus i2cBus) : base(i2cBu
button.Clicked += (s, e) => Clicked?.Invoke(s, e);
button.LongClicked += (s, e) => LongClicked?.Invoke(s, e);
}

/// <summary>
/// The current button state
/// </summary>
/// <returns></returns>
Task<bool> ISensor<bool>.Read()
{
return Task.FromResult(State);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="0.*" />
<PackageReference Include="Meadow.Foundation.mikroBUS.Sensors.Hid.CJoystick" Version="0.*" />
<ProjectReference Include="..\..\Driver\CJoystick.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/CTempHum15/Driver/CTempHum15.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Meadow.Foundation.Sensors.Atmospheric;
using Meadow.Hardware;

namespace Meadow.Foundation.mikroBUS
namespace Meadow.Foundation.mikroBUS.Sensors.Atmospheric
{
/// <summary>
/// Represents a mikroBUS Temp and Hum 15 Click board
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="0.*" />
<PackageReference Include="Meadow.Foundation.mikroBUS.Sensors.Atmospheric.CTempHum15" Version="0.*" />
<ProjectReference Include="..\..\Driver\CTempHum15.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/CTempHum15/Sample/CTempHum15_Sample/MeadowApp.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Meadow;
using Meadow.Devices;
using Meadow.Foundation.mikroBUS;
using Meadow.Foundation.mikroBUS.Sensors.Atmospheric;
using System;
using System.Threading.Tasks;

Expand Down
Loading