DarthAffe / RGB.NET

The one-stop SDK for RGB-peripherals

Home Page:http://lib.arge.be

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Corsair light controller identification problem

null-001 opened this issue · comments

I found in the process of using the actual Lighting node pro or commander in lamp and fan are independent identification equipment, such as I have 2 lamp tape, but put go up after recognition into a light band 1 and light with 2, cannot merge identification, the end result is the time when the light control light with 1 and the effect of light is the same with, not coherent

Hello, if I understand correcly you want to apply an effect to two LED strips as if they are one, is that right?

In that case what you need to do is create a LED group:

// Make sure the LED strips don't overlap eachother
RGBSurface.Instance.AlignDevices();
// Create an empty new LED group
ListLedGroup ledGroup = new ListLedGroup();
// Get all devices on the surface that are a LED stripe
foreach (IRGBDevice rgbDevice in RGBSurface.Instance.Devices.Where(d => d.DeviceInfo.DeviceType == RGBDeviceType.LedStripe))
{
    // Add all LEDs of the RGB device to the LED group 
    // Note: this works because IRGBDevice is an IEnumerable<Led>
    ledGroup.AddLeds(rgbDevice);
}

From there you can apply a brush to the entire LED group:

ledGroup.Brush = new LinearGradientBrush(new RainbowGradient());

The brush will spread over the entire LED group, creating one coherent effect across your LED strips.