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

Support .NET Core #3

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Update TestApp
ryaneverett33 committed Oct 7, 2019
commit afca11fa8ac105f5a5a16c5f1e38e2443173e004
4 changes: 2 additions & 2 deletions src/TestApp/ColorWipe.cs
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ public void Execute(AbortRequest request)

//Set brightness to maximum (255)
//Use Unknown as strip type. Then the type will be set in the native assembly.
settings.Channels[0] = new Channel(ledCount, 18, 255, false, StripType.WS2812_STRIP);
settings.Channel_1 = new Channel(ledCount, 18, 255, false, StripType.WS2812_STRIP);

using (var controller = new WS281x(settings))
{
@@ -37,7 +37,7 @@ public void Execute(AbortRequest request)

private static void Wipe(WS281x controller, Color color)
{
for (int i = 0; i <= controller.Settings.Channels[0].LEDs.Count - 1; i++)
for (int i = 0; i <= controller.Settings.Channel_1.LEDs.Count - 1; i++)
{
controller.SetLEDColor(0, i, color);
controller.Render();
4 changes: 2 additions & 2 deletions src/TestApp/RainbowColorAnimation.cs
Original file line number Diff line number Diff line change
@@ -24,15 +24,15 @@ public void Execute(AbortRequest request)

//Set brightness to maximum (255)
//Use Unknown as strip type. Then the type will be set in the native assembly.
settings.Channels[0] = new Channel(ledCount, 18, 255, false, StripType.WS2812_STRIP);
settings.Channel_1 = new Channel(ledCount, 18, 255, false, StripType.WS2812_STRIP);

using (var controller = new WS281x(settings))
{
var colors = GetAnimationColors();
while (!request.IsAbortRequested)
{

for (int i = 0; i <= controller.Settings.Channels[0].LEDCount - 1; i++)
for (int i = 0; i <= controller.Settings.Channel_1.LEDCount - 1; i++)
{
var colorIndex = (i + colorOffset) % colors.Count;
controller.SetLEDColor(0, i, colors[colorIndex]);