Update Thermaltake Riing controller for resizable channels
This commit is contained in:
parent
62518b5163
commit
bc01ec0e4b
6 changed files with 40 additions and 87 deletions
|
|
@ -29,11 +29,11 @@ ThermaltakeRiingController::~ThermaltakeRiingController()
|
|||
|
||||
}
|
||||
|
||||
void ThermaltakeRiingController::SetChannelLEDs(unsigned char channel, std::vector<RGBColor> colors)
|
||||
void ThermaltakeRiingController::SetChannelLEDs(unsigned char channel, RGBColor * colors, unsigned int num_colors)
|
||||
{
|
||||
unsigned char* color_data = new unsigned char[3 * colors.size()];
|
||||
unsigned char* color_data = new unsigned char[3 * num_colors];
|
||||
|
||||
for(int color = 0; color < colors.size(); color++)
|
||||
for(int color = 0; color < num_colors; color++)
|
||||
{
|
||||
int color_idx = color * 3;
|
||||
color_data[color_idx + 0] = RGBGetGValue(colors[color]);
|
||||
|
|
@ -41,7 +41,7 @@ void ThermaltakeRiingController::SetChannelLEDs(unsigned char channel, std::vect
|
|||
color_data[color_idx + 2] = RGBGetBValue(colors[color]);
|
||||
}
|
||||
|
||||
SendRGB(channel, current_mode, current_speed, colors.size(), color_data);
|
||||
SendRGB(channel, current_mode, current_speed, num_colors, color_data);
|
||||
|
||||
delete[] color_data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public:
|
|||
ThermaltakeRiingController(libusb_device_handle* dev_handle);
|
||||
~ThermaltakeRiingController();
|
||||
|
||||
void SetChannelLEDs(unsigned char channel, std::vector<RGBColor> colors);
|
||||
void SetChannelLEDs(unsigned char channel, RGBColor * colors, unsigned int num_colors);
|
||||
void SetMode(unsigned char mode, unsigned char speed);
|
||||
|
||||
unsigned int channel_leds[5];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue