-
-
Notifications
You must be signed in to change notification settings - Fork 64
Scale separate segments of a channel
If you have complex setup of lighting channels with different segments and segment sizes and want to scale them individually, then you can use the scaleSegments
function.
With the function you can define segments like a "Short Strip" with 15 leds or normal strips with 10 leds and scale them to any number of leds you want.
The scaling must be defined in an onUpdateHook
. First the different segments of the channel must be defined.
Therefore create a SegmentScaling
array and define all segments in the order they are connected to the channel.
Each SegmentScaling
consists out of the length of the segment in iCUE and the size to which it should be scaled.
After defining all SegmentScaling
's call the scaleSegments
function and pass the LEDController as first argument.
The second argument must be the channel index and the last two arguments are the segments and the number of segments.
The following example show the scaling of four segments:
ledController.onUpdateHook(0, []() {
CLP::SegmentScaling segments[4] = {{15, 22}, {27, 38}, {15, 22}, {27, 38}};
CLP::scaleSegments(&ledController, 0, segments, 4);
});
The segments represent a "Single Monitor Mode" setup in iCUE with two short strips and two long strips. The segments/strips are scaled to real sizes, so any ambient lighting setup can be realized. So you are not restricted to use 27/15 leds for your ambient lighting with iCUE.