Store name in ColorfulGPUControllers to avoid setting it in detectors

This commit is contained in:
Adam Honse 2025-08-04 17:12:14 -05:00
parent 2ec68c29de
commit 526d35edfe
8 changed files with 32 additions and 14 deletions

View file

@ -12,10 +12,11 @@
#include "pci_ids.h"
#include "LogManager.h"
ColorfulGPUController::ColorfulGPUController(i2c_smbus_interface* bus, colorful_gpu_dev_id dev)
ColorfulGPUController::ColorfulGPUController(i2c_smbus_interface* bus, colorful_gpu_dev_id dev, std::string dev_name)
{
this->bus = bus;
this->dev = dev;
this->bus = bus;
this->dev = dev;
this->name = dev_name;
}
ColorfulGPUController::~ColorfulGPUController()
@ -33,6 +34,11 @@ std::string ColorfulGPUController::GetDeviceLocation()
return("I2C: " + return_string);
}
std::string ColorfulGPUController::GetDeviceName()
{
return(name);
}
void ColorfulGPUController::SetDirect(RGBColor color)
{
uint8_t r = RGBGetRValue(color);