Skip to content

Commit

Permalink
added silk display driver
Browse files Browse the repository at this point in the history
  • Loading branch information
ctacke committed Apr 24, 2024
1 parent 112c439 commit 7dcedbc
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 46 deletions.
45 changes: 45 additions & 0 deletions Source/Devices/Modbus/Modbus.Device.Samples.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34316.72
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tstat8_Sample", "Tstat8_Sample\Tstat8_Sample.csproj", "{BF6E370F-F567-4E11-96C3-83E62C5B73A7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_ref", "_ref", "{22E0295F-C4C6-4243-8A4C-9F4AFEDB4990}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Modbus", "..\..\..\..\Meadow.Modbus\src\Meadow.Modbus\Meadow.Modbus.csproj", "{86D9EAB4-A0F5-49AD-816E-87A115D172EF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Contracts", "..\..\..\..\Meadow.Contracts\Source\Meadow.Contracts\Meadow.Contracts.csproj", "{3FBF6C98-C435-469F-9124-8508851C1F02}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BF6E370F-F567-4E11-96C3-83E62C5B73A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BF6E370F-F567-4E11-96C3-83E62C5B73A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BF6E370F-F567-4E11-96C3-83E62C5B73A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BF6E370F-F567-4E11-96C3-83E62C5B73A7}.Release|Any CPU.Build.0 = Release|Any CPU
{86D9EAB4-A0F5-49AD-816E-87A115D172EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86D9EAB4-A0F5-49AD-816E-87A115D172EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86D9EAB4-A0F5-49AD-816E-87A115D172EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{86D9EAB4-A0F5-49AD-816E-87A115D172EF}.Release|Any CPU.Build.0 = Release|Any CPU
{3FBF6C98-C435-469F-9124-8508851C1F02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FBF6C98-C435-469F-9124-8508851C1F02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FBF6C98-C435-469F-9124-8508851C1F02}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{3FBF6C98-C435-469F-9124-8508851C1F02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FBF6C98-C435-469F-9124-8508851C1F02}.Release|Any CPU.Build.0 = Release|Any CPU
{3FBF6C98-C435-469F-9124-8508851C1F02}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{86D9EAB4-A0F5-49AD-816E-87A115D172EF} = {22E0295F-C4C6-4243-8A4C-9F4AFEDB4990}
{3FBF6C98-C435-469F-9124-8508851C1F02} = {22E0295F-C4C6-4243-8A4C-9F4AFEDB4990}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {48F60EEB-CC4F-4A4D-992B-CBEA14A1BDE1}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net8.0-windows</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Source/Meadow.Desktop/AvaloniaMeadow/AvaloniaMeadow.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
Expand Down
6 changes: 1 addition & 5 deletions Source/Meadow.Desktop/HMI_Views/HMI_Views.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net8.0-windows</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0-windows'">
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

<ItemGroup>
<None Remove="img_meadow.bmp" />
Expand Down
12 changes: 3 additions & 9 deletions Source/Meadow.Desktop/HMI_Views/MeadowApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public override Task Initialize()

// Screen size of a ILI9341 display
//var views = new CultivarView(Device.Display);
//var views = new ProjectLabDemoView(Device.Display);
var views = new ProjectLabDemoView(Device.Display);
//var views = new AtmosphericHMI(Device.Display);
var views = new WifiWeatherV2(Device.Display);
//var views = new WifiWeatherV2(Device.Display);

_ = Task.Run(() =>
{
Expand All @@ -47,12 +47,6 @@ public override Task Run()

private void ExecutePlatformDisplayRunner()
{
#if WINDOWS
System.Windows.Forms.Application.Run(Device.Display as System.Windows.Forms.Form);
#endif
if (Device.Display is GtkDisplay gtk)
{
gtk.Run();
}
(Device.Display as SilkDisplay).Run();
}
}
30 changes: 12 additions & 18 deletions Source/Meadow.Desktop/I2C/I2C.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net8.0-windows</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0-windows'">
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net8.0-windows</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0-windows'">
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\Meadow.Core\source\implementations\desktop\Meadow.Desktop\Meadow.Desktop.csproj" />
<ProjectReference Include="..\..\..\..\Meadow.Foundation\Source\Meadow.Foundation.Peripherals\ICs.IOExpanders.Ftxxxx\Driver\ICs.IOExpanders.Ftxxxx.csproj" />
<ProjectReference Include="..\..\..\..\Meadow.Foundation\Source\Meadow.Foundation.Peripherals\Sensors.Motion.Bno055\Driver\Sensors.Motion.Bno055.csproj" />
<ProjectReference Include="..\..\..\..\Meadow.Foundation\Source\Meadow.Foundation.Peripherals\Sensors.Motion.Mpu6050\Driver\Sensors.Motion.Mpu6050.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="libmpsse.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</ItemGroup>
</Project>
Binary file removed Source/Meadow.Desktop/I2C/libmpsse.dll
Binary file not shown.
9 changes: 5 additions & 4 deletions Source/Meadow.Desktop/PixelDisplay/MeadowAppDesktop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ public override Task OnShutdown()

private void ExecutePlatformDisplayRunner()
{
(Device.Display as SilkDisplay).Run();
#if WINDOWS
System.Windows.Forms.Application.Run(Device.Display as System.Windows.Forms.Form);
#endif
if (Device.Display is GtkDisplay gtk)
{
gtk.Run();
}
// if (Device.Display is GtkDisplay gtk)
// {
// gtk.Run();
// }
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net8.0-windows</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0-windows'">
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\Meadow.Core\source\implementations\desktop\Meadow.Desktop\Meadow.Desktop.csproj" />
<ProjectReference Include="..\..\..\..\Meadow.Foundation\Source\Meadow.Foundation.Libraries_and_Frameworks\Graphics.MicroLayout\Driver\Graphics.MicroLayout.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions Source/Meadow.Desktop/PixelDisplay/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ public class Program
public static async Task Main(string[] args)
{
#if WINDOWS
System.Windows.Forms.Application.EnableVisualStyles();
System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
ApplicationConfiguration.Initialize();
// System.Windows.Forms.Application.EnableVisualStyles();
// System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
// ApplicationConfiguration.Initialize();
#endif
await MeadowOS.Start(args);
}
Expand Down

0 comments on commit 7dcedbc

Please sign in to comment.