Skip to content

Commit a4fd5e2

Browse files
authored
fixing sample (#318)
1 parent 2e136d9 commit a4fd5e2

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

samples/Graphics/GenericDriver/GenericDriver.nfproj

+2-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@
2929
<HintPath>packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.dll</HintPath>
3030
<Private>True</Private>
3131
</Reference>
32-
<Reference Include="nanoFramework.Graphics.Core, Version=1.1.37.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
33-
<HintPath>packages\nanoFramework.Graphics.1.1.37\lib\nanoFramework.Graphics.Core.dll</HintPath>
34-
<Private>True</Private>
32+
<Reference Include="nanoFramework.Graphics.Core">
33+
<HintPath>packages\nanoFramework.Graphics.Core.1.1.37\lib\nanoFramework.Graphics.Core.dll</HintPath>
3534
</Reference>
3635
<Reference Include="nanoFramework.Hardware.Esp32, Version=1.6.8.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
3736
<HintPath>packages\nanoFramework.Hardware.Esp32.1.6.8\lib\nanoFramework.Hardware.Esp32.dll</HintPath>

samples/Graphics/GenericDriver/packages.config

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<packages>
33
<package id="nanoFramework.CoreLibrary" version="1.14.2" targetFramework="netnano1.0" />
44
<package id="nanoFramework.Graphics" version="1.1.37" targetFramework="netnano1.0" />
5+
<package id="nanoFramework.Graphics.Core" version="1.1.37" targetFramework="netnano1.0" />
56
<package id="nanoFramework.Hardware.Esp32" version="1.6.8" targetFramework="netnano1.0" />
67
<package id="nanoFramework.ResourceManager" version="1.2.13" targetFramework="netnano1.0" />
78
<package id="nanoFramework.Runtime.Events" version="1.11.6" targetFramework="netnano1.0" />

samples/Graphics/UsingGenericDriver/Program.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
using System;
88
using System.Diagnostics;
9+
using System.Drawing;
910
using System.Threading;
1011
using nanoFramework.Hardware.Esp32;
1112
using nanoFramework.Presentation.Media;
@@ -68,10 +69,10 @@ public static void Main()
6869
Debug.WriteLine($"Screen initialized");
6970

7071
ushort[] toSend = new ushort[100];
71-
var blue = ColorUtility.To16Bpp(Color.Blue);
72-
var red = ColorUtility.To16Bpp(Color.Red);
73-
var green = ColorUtility.To16Bpp(Color.Green);
74-
var white = ColorUtility.To16Bpp(Color.White);
72+
var blue = Color.Blue.ToBgr565();
73+
var red = Color.Red.ToBgr565();
74+
var green = Color.Green.ToBgr565();
75+
var white = Color.White.ToBgr565();
7576

7677
for (int i = 0; i < toSend.Length; i++)
7778
{

samples/Graphics/UsingGenericDriver/UsingGenericDriver.nfproj

+6-3
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@
2626
<HintPath>..\GenericDriver\packages\nanoFramework.CoreLibrary.1.14.2\lib\mscorlib.dll</HintPath>
2727
</Reference>
2828
<Reference Include="nanoFramework.Graphics">
29-
<HintPath>..\GenericDriver\packages\nanoFramework.Graphics.St7735.1.1.23\lib\nanoFramework.Graphics.dll</HintPath>
29+
<HintPath>..\GenericDriver\packages\nanoFramework.Graphics.St7735.1.1.37\lib\nanoFramework.Graphics.dll</HintPath>
30+
</Reference>
31+
<Reference Include="nanoFramework.Graphics.Core">
32+
<HintPath>..\GenericDriver\packages\nanoFramework.Graphics.St7735.1.1.37\lib\nanoFramework.Graphics.Core.dll</HintPath>
3033
</Reference>
3134
<Reference Include="nanoFramework.Graphics.St7735">
32-
<HintPath>..\GenericDriver\packages\nanoFramework.Graphics.St7735.1.1.23\lib\nanoFramework.Graphics.St7735.dll</HintPath>
35+
<HintPath>..\GenericDriver\packages\nanoFramework.Graphics.St7735.1.1.37\lib\nanoFramework.Graphics.St7735.dll</HintPath>
3336
</Reference>
3437
<Reference Include="nanoFramework.Hardware.Esp32">
35-
<HintPath>..\GenericDriver\packages\nanoFramework.Hardware.Esp32.1.6.1\lib\nanoFramework.Hardware.Esp32.dll</HintPath>
38+
<HintPath>..\GenericDriver\packages\nanoFramework.Hardware.Esp32.1.6.8\lib\nanoFramework.Hardware.Esp32.dll</HintPath>
3639
</Reference>
3740
<Reference Include="nanoFramework.ResourceManager">
3841
<HintPath>..\GenericDriver\packages\nanoFramework.ResourceManager.1.2.13\lib\nanoFramework.ResourceManager.dll</HintPath>

samples/Graphics/UsingGenericDriver/packages.config

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="nanoFramework.CoreLibrary" version="1.14.2" targetFramework="netnano1.0" />
4-
<package id="nanoFramework.Graphics.St7735" version="1.1.23" targetFramework="netnano1.0" />
5-
<package id="nanoFramework.Hardware.Esp32" version="1.6.1" targetFramework="netnano1.0" />
4+
<package id="nanoFramework.Graphics.St7735" version="1.1.37" targetFramework="netnano1.0" />
5+
<package id="nanoFramework.Hardware.Esp32" version="1.6.8" targetFramework="netnano1.0" />
66
<package id="nanoFramework.ResourceManager" version="1.2.13" targetFramework="netnano1.0" />
77
<package id="nanoFramework.Runtime.Events" version="1.11.6" targetFramework="netnano1.0" />
88
<package id="nanoFramework.Runtime.Native" version="1.6.6" targetFramework="netnano1.0" />

0 commit comments

Comments
 (0)