public static void ChangeAllDevicesColor(Color color) { PrintLine("Starting SDK..."); MyAuraSdk.SwitchMode(); var allDevices = MyAuraSdk.Enumerate(0); Console.Clear(); foreach (IAuraSyncDevice allDevice in allDevices) { Print($"Setting device {allDevice.Name}..."); StopWatch.Restart(); foreach (IAuraRgbLight light in allDevice.Lights) { light.Red = color.R; light.Green = color.G; light.Blue = color.B; } allDevice.Apply(); StopWatch.Stop(); PrintLine($"Done! took {StopWatch.ElapsedMilliseconds}ms"); } PrintLine("Stopping SDK..."); MyAuraSdk.ReleaseControl(0); }
public void Dispose() { _sdk?.ReleaseControl(0); _sdk = null; }
public void ReleaseControl() { sdk.ReleaseControl(0); }
/// <inheritdoc /> public void ResetDevices() { _sdk?.ReleaseControl(0); _sdk?.SwitchMode(); }
public override void Deactivate() { sdk.ReleaseControl(0); devs = null; }