RGBController API Overhaul

* Reorganize and clean up RGBController API functions
    * Add functions to get protected RGBController member values
    * Make NetworkClient, ProfileManager, and ResourceManager friend classes so they can access protected members
    * Protected previously-public RGBController members
        * Information strings (name, vendor, description, version, serial location)
        * Device type
        * Active mode
        * Flags
        * LEDs vector
        * LED alternate names vector
        * Modes vector
        * Colors vector
        * Zones vector
    * Add CONTROLLER_FLAG_HIDDEN to allow plugins to hide controllers from control GUI
    * Add update reason codes to RGBController update callback and signal updates on more RGBController events
    * Add loop zone types and segmented zone type
    * Add matrix map field to segments
    * Rework matrix_map_type from using pointers to vector to prevent memory leaks
    * Rework KeyboardLayoutManager to return new matrix_map_type
    * Add access mutex to RGBController API
    * Add per-zone modes ot RGBController API
    * Add JSON description functions to RGBController API
This commit is contained in:
Adam Honse
2025-09-23 20:38:37 -05:00
parent 6deaf2f4fd
commit fdaf2eee6c
657 changed files with 9060 additions and 8801 deletions

View File

@@ -313,7 +313,6 @@ void RGBController_CMARGBController::Init_Controller()
ARGB_zone.leds_min = 4;
ARGB_zone.leds_max = 48;
ARGB_zone.leds_count = zone_led_count;
ARGB_zone.matrix_map = NULL;
zones.push_back(ARGB_zone);
}
@@ -361,7 +360,7 @@ void RGBController_CMARGBController::SetupZones()
SetupColors();
}
void RGBController_CMARGBController::ResizeZone(int zone, int new_size)
void RGBController_CMARGBController::DeviceResizeZone(int zone, int new_size)
{
if((size_t) zone >= zones.size())
{
@@ -386,18 +385,18 @@ void RGBController_CMARGBController::DeviceUpdateLEDs()
for(int zone_idx = first_zone(cmargb->GetZoneIndex()); zone_idx < end_zone; zone_idx++)
{
UpdateZoneLEDs(zone_idx);
DeviceUpdateZoneLEDs(zone_idx);
}
}
void RGBController_CMARGBController::UpdateZoneLEDs(int zone)
void RGBController_CMARGBController::DeviceUpdateZoneLEDs(int zone)
{
controller->SetLedsDirect( zones[zone].colors, zones[zone].leds_count );
}
void RGBController_CMARGBController::UpdateSingleLED(int led)
void RGBController_CMARGBController::DeviceUpdateSingleLED(int led)
{
UpdateZoneLEDs(GetLED_Zone(led));
DeviceUpdateZoneLEDs(GetLED_Zone(led));
}
void RGBController_CMARGBController::DeviceUpdateMode()

View File

@@ -25,11 +25,11 @@ public:
~RGBController_CMARGBController();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();

View File

@@ -202,7 +202,6 @@ void RGBController_CMARGBGen2A1Controller::SetupZones()
new_zone.leds_min = 0;
new_zone.leds_max = CM_ARGB_GEN2_A1_CHANNEL_MAX_SIZE;
new_zone.leds_count = 0;
new_zone.matrix_map = nullptr;
zones.push_back(new_zone);
@@ -219,7 +218,7 @@ void RGBController_CMARGBGen2A1Controller::SetupZones()
SetupColors();
}
void RGBController_CMARGBGen2A1Controller::ResizeZone(int zone, int new_size)
void RGBController_CMARGBGen2A1Controller::DeviceResizeZone(int zone, int new_size)
{
zones[zone].leds_count = new_size;
@@ -261,7 +260,7 @@ void RGBController_CMARGBGen2A1Controller::DeviceUpdateLEDs()
}
}
void RGBController_CMARGBGen2A1Controller::UpdateZoneLEDs(int zone)
void RGBController_CMARGBGen2A1Controller::DeviceUpdateZoneLEDs(int zone)
{
if(zones[zone].leds_count > 0)
{
@@ -304,7 +303,7 @@ void RGBController_CMARGBGen2A1Controller::UpdateSegmentLEDs(int zone, int subch
controller->SendChannelColors(zone, CM_ARGB_GEN2_A1_SUBCHANNEL_ALL, color_vector);
}
void RGBController_CMARGBGen2A1Controller::UpdateSingleLED(int /*led*/)
void RGBController_CMARGBGen2A1Controller::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}

View File

@@ -23,11 +23,12 @@ public:
~RGBController_CMARGBGen2A1Controller();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void DeviceUpdateZoneLEDs(int zone);
void UpdateSegmentLEDs(int zone, int subchannel);
void UpdateSingleLED(int led);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
void DeviceSaveMode();

View File

@@ -151,7 +151,6 @@ void RGBController_CMGD160Controller::SetupZones()
front.leds_min = CM_GD160_LEDS_PER_SIDE;
front.leds_max = CM_GD160_LEDS_PER_SIDE;
front.leds_count = CM_GD160_LEDS_PER_SIDE;
front.matrix_map = NULL;
zones.push_back(front);
for(unsigned int i = 0; i < CM_GD160_LEDS_PER_SIDE; i++)
@@ -168,7 +167,6 @@ void RGBController_CMGD160Controller::SetupZones()
back.leds_min = CM_GD160_LEDS_PER_SIDE;
back.leds_max = CM_GD160_LEDS_PER_SIDE;
back.leds_count = CM_GD160_LEDS_PER_SIDE;
back.matrix_map = NULL;
zones.push_back(back);
for(unsigned int i = 0; i < CM_GD160_LEDS_PER_SIDE; i++)
@@ -182,13 +180,6 @@ void RGBController_CMGD160Controller::SetupZones()
SetupColors();
}
void RGBController_CMGD160Controller::ResizeZone(int /*zone*/, int /*new_size*/)
{
/*---------------------------------------------------------*\
| This device does not support resizing zones |
\*---------------------------------------------------------*/
}
void RGBController_CMGD160Controller::DeviceUpdateLEDs()
{
switch(modes[active_mode].value)
@@ -206,12 +197,12 @@ void RGBController_CMGD160Controller::DeviceUpdateLEDs()
}
}
void RGBController_CMGD160Controller::UpdateZoneLEDs(int /*zone*/)
void RGBController_CMGD160Controller::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_CMGD160Controller::UpdateSingleLED(int /*led*/)
void RGBController_CMGD160Controller::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}

View File

@@ -23,14 +23,12 @@ public:
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
private:
CMGD160Controller* controller;
};
};

View File

@@ -49,22 +49,6 @@ RGBController_CMKeyboardController::RGBController_CMKeyboardController(CMKeyboar
RGBController_CMKeyboardController::~RGBController_CMKeyboardController()
{
/*---------------------------------------------------------*\
| Delete the matrix map |
\*---------------------------------------------------------*/
for(unsigned int zone_index = 0; zone_index < zones.size(); zone_index++)
{
if(zones[zone_index].matrix_map != NULL)
{
if(zones[zone_index].matrix_map->map != NULL)
{
delete zones[zone_index].matrix_map->map;
}
delete zones[zone_index].matrix_map;
}
}
if(m_pController)
{
delete m_pController;
@@ -98,9 +82,6 @@ void RGBController_CMKeyboardController::SetupZones()
{
KeyboardLayoutManager new_kb(m_keyboardLayout, coolermaster->layout_new->base_size, coolermaster->layout_new->key_values);
matrix_map_type * new_map = new matrix_map_type;
new_zone.matrix_map = new_map;
if(coolermaster->layout_new->base_size != KEYBOARD_SIZE_EMPTY)
{
/*---------------------------------------------------------*\
@@ -109,15 +90,7 @@ void RGBController_CMKeyboardController::SetupZones()
keyboard_keymap_overlay_values* temp = coolermaster->layout_new;
new_kb.ChangeKeys(*temp);
new_map->height = new_kb.GetRowCount();
new_map->width = new_kb.GetColumnCount();
new_map->map = new unsigned int[new_map->height * new_map->width];
/*---------------------------------------------------------*\
| Matrix map still uses declared zone rows and columns |
| as the packet structure depends on the matrix map |
\*---------------------------------------------------------*/
new_kb.GetKeyMap(new_map->map, KEYBOARD_MAP_FILL_TYPE_COUNT, new_map->height, new_map->width);
new_zone.matrix_map = new_kb.GetKeyMap(KEYBOARD_MAP_FILL_TYPE_COUNT);
/*---------------------------------------------------------*\
| Create LEDs for the Matrix zone |
@@ -161,27 +134,17 @@ void RGBController_CMKeyboardController::SetupZones()
SetupColors();
}
void RGBController_CMKeyboardController::ResizeZone(int /*zone*/, int /*new_size*/)
{
}
void RGBController_CMKeyboardController::DeviceUpdateLEDs()
{
m_pController->SetLeds(leds, colors);
}
void RGBController_CMKeyboardController::UpdateSingleLED(int led, RGBColor color)
{
uint8_t key_value = m_pLayoutManager->GetKeyValueAt(led);
m_pController->SetSingleLED(key_value, color);
}
void RGBController_CMKeyboardController::UpdateSingleLED(int led)
void RGBController_CMKeyboardController::DeviceUpdateSingleLED(int led)
{
m_pController->SetSingleLED(led, colors[led]);
}
void RGBController_CMKeyboardController::UpdateZoneLEDs(int /*zone_idx*/)
void RGBController_CMKeyboardController::DeviceUpdateZoneLEDs(int /*zone_idx*/)
{
DeviceUpdateLEDs();
}

View File

@@ -24,12 +24,10 @@ public:
~RGBController_CMKeyboardController();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateSingleLED(int led, RGBColor color);
void UpdateSingleLED(int led);
void UpdateZoneLEDs(int zone_idx);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone_idx);
void SetCustomMode();
void DeviceUpdateMode();

View File

@@ -140,7 +140,6 @@ void RGBController_CMMM711Controller::Init_Controller()
mouse_zone.leds_min = 2;
mouse_zone.leds_max = 2;
mouse_zone.leds_count = 2;
mouse_zone.matrix_map = NULL;
zones.push_back(mouse_zone);
led wheel_led;
@@ -159,13 +158,6 @@ void RGBController_CMMM711Controller::SetupZones()
SetupColors();
}
void RGBController_CMMM711Controller::ResizeZone(int /*zone*/, int /*new_size*/)
{
/*---------------------------------------------------------*\
| This device does not support resizing zones |
\*---------------------------------------------------------*/
}
void RGBController_CMMM711Controller::DeviceUpdateLEDs()
{
RGBColor wheel = applyBrightness(colors[0], modes[active_mode].brightness);
@@ -174,12 +166,12 @@ void RGBController_CMMM711Controller::DeviceUpdateLEDs()
controller->SetLedsDirect( wheel, logo);
}
void RGBController_CMMM711Controller::UpdateZoneLEDs(int /*zone*/)
void RGBController_CMMM711Controller::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_CMMM711Controller::UpdateSingleLED(int /*led*/)
void RGBController_CMMM711Controller::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}

View File

@@ -26,11 +26,10 @@ public:
~RGBController_CMMM711Controller();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
void DeviceSaveMode();

View File

@@ -133,7 +133,6 @@ void RGBController_CMMM712Controller::Init_Controller()
mouse_zone.leds_min = 1;
mouse_zone.leds_max = 1;
mouse_zone.leds_count = 1;
mouse_zone.matrix_map = NULL;
zones.push_back(mouse_zone);
led logo_led;
@@ -147,13 +146,6 @@ void RGBController_CMMM712Controller::SetupZones()
SetupColors();
}
void RGBController_CMMM712Controller::ResizeZone(int /*zone*/, int /*new_size*/)
{
/*---------------------------------------------------------*\
| This device does not support resizing zones |
\*---------------------------------------------------------*/
}
void RGBController_CMMM712Controller::DeviceUpdateLEDs()
{
modes[active_mode].brightness=255;
@@ -162,12 +154,12 @@ void RGBController_CMMM712Controller::DeviceUpdateLEDs()
controller->SetLedsDirect(logo);
}
void RGBController_CMMM712Controller::UpdateZoneLEDs(int /*zone*/)
void RGBController_CMMM712Controller::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_CMMM712Controller::UpdateSingleLED(int /*led*/)
void RGBController_CMMM712Controller::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}

View File

@@ -27,11 +27,10 @@ public:
~RGBController_CMMM712Controller();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
void DeviceSaveMode();

View File

@@ -179,7 +179,6 @@ void RGBController_CMMMController::Init_Controller()
mouse_zone.leds_min = leds_count;
mouse_zone.leds_max = leds_count;
mouse_zone.leds_count = leds_count;
mouse_zone.matrix_map = NULL;
zones.push_back(mouse_zone);
int value = 0;
@@ -212,13 +211,6 @@ void RGBController_CMMMController::SetupZones()
SetupColors();
}
void RGBController_CMMMController::ResizeZone(int /*zone*/, int /*new_size*/)
{
/*---------------------------------------------------------*\
| This device does not support resizing zones |
\*---------------------------------------------------------*/
}
void RGBController_CMMMController::DeviceUpdateLEDs()
{
int value = 0;
@@ -239,12 +231,12 @@ void RGBController_CMMMController::DeviceUpdateLEDs()
controller->SetLedsDirect(wheel, buttons, logo);
}
void RGBController_CMMMController::UpdateZoneLEDs(int /*zone*/)
void RGBController_CMMMController::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_CMMMController::UpdateSingleLED(int /*led*/)
void RGBController_CMMMController::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}

View File

@@ -27,11 +27,10 @@ public:
~RGBController_CMMMController();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
void DeviceSaveMode();

View File

@@ -122,7 +122,6 @@ void RGBController_CMMP750Controller::SetupZones()
MP_zone.leds_min = 1;
MP_zone.leds_max = 1;
MP_zone.leds_count = 1;
MP_zone.matrix_map = NULL;
zones.push_back(MP_zone);
led MP_led;
@@ -144,13 +143,6 @@ void RGBController_CMMP750Controller::SetupZones()
}
}
void RGBController_CMMP750Controller::ResizeZone(int /*zone*/, int /*new_size*/)
{
/*---------------------------------------------------------*\
| This device does not support resizing zones |
\*---------------------------------------------------------*/
}
void RGBController_CMMP750Controller::DeviceUpdateLEDs()
{
unsigned char red = RGBGetRValue(colors[0]);
@@ -160,7 +152,7 @@ void RGBController_CMMP750Controller::DeviceUpdateLEDs()
controller->SetColor(red, grn, blu);
}
void RGBController_CMMP750Controller::UpdateZoneLEDs(int zone)
void RGBController_CMMP750Controller::DeviceUpdateZoneLEDs(int zone)
{
RGBColor color = colors[zone];
unsigned char red = RGBGetRValue(color);
@@ -170,9 +162,9 @@ void RGBController_CMMP750Controller::UpdateZoneLEDs(int zone)
controller->SetColor(red, grn, blu);
}
void RGBController_CMMP750Controller::UpdateSingleLED(int led)
void RGBController_CMMP750Controller::DeviceUpdateSingleLED(int led)
{
UpdateZoneLEDs(led);
DeviceUpdateZoneLEDs(led);
}
void RGBController_CMMP750Controller::DeviceUpdateMode()

View File

@@ -21,11 +21,10 @@ public:
~RGBController_CMMP750Controller();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();

View File

@@ -153,7 +153,6 @@ void RGBController_CMMonitorController::SetupZones()
z.leds_min = 47;
z.leds_max = 47;
z.leds_count = 47;
z.matrix_map = NULL;
zones.push_back(z);
@@ -168,13 +167,6 @@ void RGBController_CMMonitorController::SetupZones()
SetupColors();
}
void RGBController_CMMonitorController::ResizeZone(int /*zone*/, int /*new_size*/)
{
/*---------------------------------------------------------*\
| This device does not support resizing zones |
\*---------------------------------------------------------*/
}
void RGBController_CMMonitorController::DeviceUpdateLEDs()
{
if(modes[active_mode].value == CM_MONITOR_DIRECT_MODE)
@@ -187,12 +179,12 @@ void RGBController_CMMonitorController::DeviceUpdateLEDs()
}
}
void RGBController_CMMonitorController::UpdateZoneLEDs(int /*zone*/)
void RGBController_CMMonitorController::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_CMMonitorController::UpdateSingleLED(int /*led*/)
void RGBController_CMMonitorController::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}

View File

@@ -22,11 +22,9 @@ public:
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();

View File

@@ -163,7 +163,6 @@ void RGBController_CMR6000Controller::SetupZones()
GP_zone.leds_min = 1;
GP_zone.leds_max = 1;
GP_zone.leds_count = 1;
GP_zone.matrix_map = NULL;
zones.push_back(GP_zone);
led GP_led;
@@ -175,13 +174,6 @@ void RGBController_CMR6000Controller::SetupZones()
}
void RGBController_CMR6000Controller::ResizeZone(int /*zone*/, int /*new_size*/)
{
/*---------------------------------------------------------*\
| This device does not support resizing zones |
\*---------------------------------------------------------*/
}
void RGBController_CMR6000Controller::DeviceUpdateLEDs()
{
mode new_mode = modes[active_mode];
@@ -212,12 +204,12 @@ void RGBController_CMR6000Controller::DeviceUpdateLEDs()
controller->SetMode(new_mode.value, new_mode.speed, color1, color2, rnd, bri);
}
void RGBController_CMR6000Controller::UpdateZoneLEDs(int /*zone*/)
void RGBController_CMR6000Controller::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_CMR6000Controller::UpdateSingleLED(int /*led*/)
void RGBController_CMR6000Controller::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}

View File

@@ -22,13 +22,13 @@ public:
~RGBController_CMR6000Controller();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
private:
CMR6000Controller* controller;

View File

@@ -199,7 +199,7 @@ void RGBController_CMRGBController::LoadConfigFromDeviceController(int mode_idx)
{
for(int led_idx = 0; led_idx < (int)leds.size(); led_idx++)
{
SetLED(led_idx, controller->GetPortColor(led_idx));
colors[led_idx] = controller->GetPortColor(led_idx);
}
}
@@ -231,7 +231,6 @@ void RGBController_CMRGBController::SetupZones()
new_zone->leds_min = 1;
new_zone->leds_max = 4;
new_zone->leds_count = 4;
new_zone->matrix_map = NULL;
for(int i = 1; i <= CM_RGBC_NUM_LEDS; i++)
{
@@ -244,24 +243,20 @@ void RGBController_CMRGBController::SetupZones()
SetupColors();
}
void RGBController_CMRGBController::ResizeZone(int /*zone*/, int /*new_size*/)
{
}
void RGBController_CMRGBController::DeviceUpdateLEDs()
{
for(int zone_idx = 0; zone_idx < (int)zones.size(); zone_idx++)
{
UpdateZoneLEDs(zone_idx);
DeviceUpdateZoneLEDs(zone_idx);
}
}
void RGBController_CMRGBController::UpdateZoneLEDs(int zone)
void RGBController_CMRGBController::DeviceUpdateZoneLEDs(int zone)
{
controller->SetLedsDirect(zones[zone].colors[0], zones[zone].colors[1], zones[zone].colors[2], zones[zone].colors[3]);
}
void RGBController_CMRGBController::UpdateSingleLED(int /*led*/)
void RGBController_CMRGBController::DeviceUpdateSingleLED(int /*led*/)
{
}

View File

@@ -22,11 +22,10 @@ public:
~RGBController_CMRGBController();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();

View File

@@ -196,7 +196,6 @@ void RGBController_CMSmallARGBController::Init_Controller()
ARGB_zone.leds_min = CM_SMALL_ARGB_MIN_LEDS;
ARGB_zone.leds_max = CM_SMALL_ARGB_MAX_LEDS;
ARGB_zone.leds_count = zone_led_count;
ARGB_zone.matrix_map = NULL;
zones.push_back(ARGB_zone);
}
@@ -244,7 +243,7 @@ void RGBController_CMSmallARGBController::SetupZones()
SetupColors();
}
void RGBController_CMSmallARGBController::ResizeZone(int zone, int new_size)
void RGBController_CMSmallARGBController::DeviceResizeZone(int zone, int new_size)
{
if((size_t) zone >= zones.size())
{
@@ -263,11 +262,11 @@ void RGBController_CMSmallARGBController::DeviceUpdateLEDs()
{
for(int zone_idx = 0; zone_idx < (int)zones.size(); zone_idx++)
{
UpdateZoneLEDs(zone_idx);
DeviceUpdateZoneLEDs(zone_idx);
}
}
void RGBController_CMSmallARGBController::UpdateZoneLEDs(int zone)
void RGBController_CMSmallARGBController::DeviceUpdateZoneLEDs(int zone)
{
if(serial >= CM_SMALL_ARGB_FW0012)
{
@@ -275,9 +274,9 @@ void RGBController_CMSmallARGBController::UpdateZoneLEDs(int zone)
}
}
void RGBController_CMSmallARGBController::UpdateSingleLED(int led)
void RGBController_CMSmallARGBController::DeviceUpdateSingleLED(int led)
{
UpdateZoneLEDs(led);
DeviceUpdateZoneLEDs(led);
}
void RGBController_CMSmallARGBController::SetCustomMode()

View File

@@ -27,11 +27,11 @@ public:
~RGBController_CMSmallARGBController();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void SetCustomMode();
void DeviceUpdateMode();