diff --git a/Controllers/LianLiController/LianLiUniHubALController/LianLiUniHubALController.cpp b/Controllers/LianLiController/LianLiUniHubALController/LianLiUniHubALController.cpp index 45930d0e..5b365c8f 100644 --- a/Controllers/LianLiController/LianLiUniHubALController/LianLiUniHubALController.cpp +++ b/Controllers/LianLiController/LianLiUniHubALController/LianLiUniHubALController.cpp @@ -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); } }