mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 14:35:01 -04:00
Limit HYTE CNVS brightness to 72% of maximum brightness according to V1.1 of protocol documentation. It could be reworked in the future to only limit brightness when the sum exceeds the value, but that would require significantly more math during update
This commit is contained in:
@@ -48,6 +48,7 @@ void HYTEMousematController::FirmwareAnimationControl(bool enabled)
|
||||
void HYTEMousematController::StreamingCommand(RGBColor* colors)
|
||||
{
|
||||
unsigned char serial_buf[157];
|
||||
unsigned int max_brightness = 72;
|
||||
|
||||
memset(serial_buf, 0, sizeof(serial_buf));
|
||||
|
||||
@@ -61,9 +62,9 @@ void HYTEMousematController::StreamingCommand(RGBColor* colors)
|
||||
|
||||
for(unsigned int color_idx = 0; color_idx < 50; color_idx++)
|
||||
{
|
||||
serial_buf[7 + (color_idx * 3)] = RGBGetGValue(colors[color_idx]);
|
||||
serial_buf[8 + (color_idx * 3)] = RGBGetRValue(colors[color_idx]);
|
||||
serial_buf[9 + (color_idx * 3)] = RGBGetBValue(colors[color_idx]);
|
||||
serial_buf[7 + (color_idx * 3)] = ( max_brightness * RGBGetGValue(colors[color_idx]) ) / 100;
|
||||
serial_buf[8 + (color_idx * 3)] = ( max_brightness * RGBGetRValue(colors[color_idx]) ) / 100;
|
||||
serial_buf[9 + (color_idx * 3)] = ( max_brightness * RGBGetBValue(colors[color_idx]) ) / 100;
|
||||
}
|
||||
|
||||
serialport->serial_write((char *)serial_buf, sizeof(serial_buf));
|
||||
|
||||
Reference in New Issue
Block a user