Fix setting individual LEDs when a specific zone is selected
This commit is contained in:
parent
5712717ef8
commit
23ad5ca244
3 changed files with 4 additions and 1 deletions
|
|
@ -687,6 +687,8 @@ void RGBController::SetupColors()
|
|||
|
||||
for(int zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
zones[zone_idx].start_idx=total_led_count;
|
||||
|
||||
if(colors.size() > 0)
|
||||
{
|
||||
zones[zone_idx].colors = &colors[total_led_count];
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ typedef struct
|
|||
zone_type type; /* Zone type */
|
||||
led * leds; /* List of LEDs in zone */
|
||||
RGBColor * colors; /* Colors of LEDs in zone */
|
||||
unsigned int start_idx; /* Start index of led/color */
|
||||
unsigned int leds_count; /* Number of LEDs in zone */
|
||||
unsigned int leds_min; /* Minimum number of LEDs */
|
||||
unsigned int leds_max; /* Maximum number of LEDs */
|
||||
|
|
|
|||
|
|
@ -760,7 +760,7 @@ void Ui::OpenRGBDevicePage::on_SetLEDButton_clicked()
|
|||
{
|
||||
selected_zone = selected_zone - 1;
|
||||
|
||||
device->zones[selected_zone].colors[index] = color;
|
||||
device->SetLED(device->zones[selected_zone].start_idx + index, color);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue