Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Source/Meadow.ProjectLab/ProjectLab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ protected override IPin GetMcpResetPin(IF7CoreComputeMeadowDevice ccm)
/// </summary>
public class ProjectLab : IMeadowAppEmbeddedHardwareProvider<IProjectLabHardware>
{
private static IProjectLabHardware? _instance;

protected ProjectLab() { }

protected virtual IPin GetMcpResetPin(IF7CoreComputeMeadowDevice ccm)
Expand All @@ -54,7 +56,7 @@ protected virtual IPin GetMcpResetPin(IF7CoreComputeMeadowDevice ccm)
/// </summary>
public static IProjectLabHardware Create()
{
return new ProjectLab()
return _instance ??= new ProjectLab()
.Create(Resolver.Services.Get<IMeadowDevice>()!);
}

Expand Down
Loading