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 9839b961a5
commit 4ba7faa7a3
657 changed files with 9060 additions and 8801 deletions

View File

@@ -56,7 +56,6 @@ void RGBController_AMBX::SetupZones()
side_lights_zone.leds_min = 2;
side_lights_zone.leds_max = 2;
side_lights_zone.leds_count = 2;
side_lights_zone.matrix_map = NULL;
zones.push_back(side_lights_zone);
zone wallwasher_zone;
@@ -65,7 +64,6 @@ void RGBController_AMBX::SetupZones()
wallwasher_zone.leds_min = 3;
wallwasher_zone.leds_max = 3;
wallwasher_zone.leds_count = 3;
wallwasher_zone.matrix_map = NULL;
zones.push_back(wallwasher_zone);
// Set up LEDs
@@ -97,11 +95,6 @@ void RGBController_AMBX::SetupZones()
SetupColors();
}
void RGBController_AMBX::ResizeZone(int /*zone*/, int /*new_size*/)
{
// This device does not support resizing zones
}
void RGBController_AMBX::DeviceUpdateLEDs()
{
if(!controller->IsInitialized())
@@ -121,7 +114,7 @@ void RGBController_AMBX::DeviceUpdateLEDs()
controller->SetLEDColors(led_values, led_colors, static_cast<unsigned int>(leds.size()));
}
void RGBController_AMBX::UpdateZoneLEDs(int zone)
void RGBController_AMBX::DeviceUpdateZoneLEDs(int zone)
{
if(!controller->IsInitialized())
{
@@ -156,7 +149,7 @@ void RGBController_AMBX::UpdateZoneLEDs(int zone)
controller->SetLEDColors(led_values, led_colors, zone_size);
}
void RGBController_AMBX::UpdateSingleLED(int led)
void RGBController_AMBX::DeviceUpdateSingleLED(int led)
{
if(!controller->IsInitialized())
{