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

Improve compatibility with Luxafor Bluetooth Pro devices #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions LuxOnAir/LFRSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public override void ShutdownHardware()
// Turn off the lights before shutting down
foreach (IDevice device in devices)
{
device.SetColor(LedTarget.All, new LuxaforSharp.Color(0, 0, 0));
device.SetColor(LedTarget.All, new LuxaforSharp.Color(0, 0, 0), null);
device.Dispose();
}
}
Expand All @@ -99,7 +99,7 @@ private void SetAllLights(System.Drawing.Color color)
foreach (IDevice device in devices)
{
// Set the required color with a short fade time
device.SetColor(LedTarget.All, new LuxaforSharp.Color(color.R, color.G, color.B), 10);
device.SetColor(LedTarget.All, new LuxaforSharp.Color(color.R, color.G, color.B), null);
}
}
}
Expand All @@ -115,7 +115,7 @@ private void WaveAllLights(System.Drawing.Color color)
foreach (IDevice device in devices)
{
// Wave the required color
device.Wave(WaveType.Long, new LuxaforSharp.Color(color.R, color.G, color.B), 10, 0);
device.Wave(WaveType.OverlappingLong, new LuxaforSharp.Color(color.R, color.G, color.B), 10, 2);
}
}
}
Expand Down Expand Up @@ -147,7 +147,7 @@ private void BlinkTimer_Elapsed(object sender, ElapsedEventArgs e)
foreach (IDevice device in devices)
{
// Blink the current color once with a longer fade time
device.Blink(LedTarget.All, new LuxaforSharp.Color(currentColor.R, currentColor.G, currentColor.B), 20, 1);
device.Blink(LedTarget.All, new LuxaforSharp.Color(currentColor.R, currentColor.G, currentColor.B), 20, 2);
}
}

Expand Down