Fix possible loss of data warning in LianLiUniHubALController.cpp
This commit is contained in:
parent
34957180be
commit
aec411e721
1 changed files with 6 additions and 6 deletions
|
|
@ -106,18 +106,18 @@ void LianLiUniHubALController::SetChannelLEDs(unsigned char channel, RGBColor *
|
|||
//Determine current position of led_data array from colors array
|
||||
cur_led_idx = ((mod_led_idx + (fan_idx * 8)) * 3);
|
||||
|
||||
fan_led_data[cur_led_idx + 0] = (unsigned char)RGBGetRValue(colors[led_idx]) * brightness;
|
||||
fan_led_data[cur_led_idx + 1] = (unsigned char)RGBGetBValue(colors[led_idx]) * brightness;
|
||||
fan_led_data[cur_led_idx + 2] = (unsigned char)RGBGetGValue(colors[led_idx]) * brightness;
|
||||
fan_led_data[cur_led_idx + 0] = (unsigned char)(RGBGetRValue(colors[led_idx]) * brightness);
|
||||
fan_led_data[cur_led_idx + 1] = (unsigned char)(RGBGetBValue(colors[led_idx]) * brightness);
|
||||
fan_led_data[cur_led_idx + 2] = (unsigned char)(RGBGetGValue(colors[led_idx]) * brightness);
|
||||
}
|
||||
else // Edge LEDs, 12 LEDs per fan
|
||||
{
|
||||
//Determine current position of led_data array from colors array
|
||||
cur_led_idx = (((mod_led_idx - 8) + (fan_idx * 12)) * 3);
|
||||
|
||||
edge_led_data[cur_led_idx + 0] = (unsigned char)RGBGetRValue(colors[led_idx]) * brightness;
|
||||
edge_led_data[cur_led_idx + 1] = (unsigned char)RGBGetBValue(colors[led_idx]) * brightness;
|
||||
edge_led_data[cur_led_idx + 2] = (unsigned char)RGBGetGValue(colors[led_idx]) * brightness;
|
||||
edge_led_data[cur_led_idx + 0] = (unsigned char)(RGBGetRValue(colors[led_idx]) * brightness);
|
||||
edge_led_data[cur_led_idx + 1] = (unsigned char)(RGBGetBValue(colors[led_idx]) * brightness);
|
||||
edge_led_data[cur_led_idx + 2] = (unsigned char)(RGBGetGValue(colors[led_idx]) * brightness);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue