Rework RGBControllers and detectors that set string fields other than name outside of the RGBController

This commit is contained in:
Adam Honse 2025-07-31 18:36:06 -05:00
parent 6a472437bb
commit abd34f1810
15 changed files with 40 additions and 27 deletions

View file

@ -52,6 +52,7 @@ RGBController_ENESMBus::RGBController_ENESMBus(ENESMBusController * controller_p
| the ENE controller's version string |
\*---------------------------------------------------------*/
version = controller->GetDeviceName();
location = controller->GetDeviceLocation();
if((version.find("DIMM_LED") != std::string::npos) || (version.find("AUDA") != std::string::npos) )
{
@ -65,6 +66,12 @@ RGBController_ENESMBus::RGBController_ENESMBus(ENESMBusController * controller_p
name = "ASUS ROG Strix Arion";
vendor = "ASUS";
}
else if(location.find("NVMe:") != std::string::npos)
{
type = DEVICE_TYPE_STORAGE;
name = "XPG Spectrix S40G";
vendor = "XPG";
}
else
{
type = DEVICE_TYPE_MOTHERBOARD;
@ -72,7 +79,6 @@ RGBController_ENESMBus::RGBController_ENESMBus(ENESMBusController * controller_p
vendor = "ASUS";
}
location = controller->GetDeviceLocation();
description = "ENE SMBus Device";
mode Direct;

View file

@ -82,10 +82,6 @@ void DetectSpectrixS40GControllers()
ENESMBusController* controller = new ENESMBusController(interface, 0x67);
RGBController_ENESMBus* rgb_controller = new RGBController_ENESMBus(controller);
rgb_controller->name = "XPG Spectrix S40G";
rgb_controller->type = DEVICE_TYPE_STORAGE;
rgb_controller->vendor = "XPG";
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}

View file

@ -116,10 +116,6 @@ void DetectSpectrixS40GControllers()
ENESMBusController* controller = new ENESMBusController(interface, 0x67);
RGBController_ENESMBus* rgb_controller = new RGBController_ENESMBus(controller);
rgb_controller->name = "XPG Spectrix S40G";
rgb_controller->type = DEVICE_TYPE_STORAGE;
rgb_controller->vendor = "XPG";
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}