Store name in MSIGPUv2Controller to avoid setting it in detector

This commit is contained in:
Adam Honse
2025-08-15 16:57:02 -05:00
parent 5db766cfa0
commit 5190274004
5 changed files with 63 additions and 57 deletions

View File

@@ -15,10 +15,11 @@
using namespace std::chrono_literals;
MSIGPUv2Controller::MSIGPUv2Controller(i2c_smbus_interface* bus, msi_gpu_dev_id dev)
MSIGPUv2Controller::MSIGPUv2Controller(i2c_smbus_interface* bus, msi_gpu_dev_id dev, std::string dev_name)
{
this->bus = bus;
this->dev = dev;
this->bus = bus;
this->dev = dev;
this->name = dev_name;
}
MSIGPUv2Controller::~MSIGPUv2Controller()
@@ -36,6 +37,11 @@ std::string MSIGPUv2Controller::GetDeviceLocation()
return("I2C: " + return_string);
}
std::string MSIGPUv2Controller::GetDeviceName()
{
return(name);
}
void MSIGPUv2Controller::SetRGB1(unsigned char red, unsigned char green, unsigned char blue)
{
MSIGPURegisterWrite(MSI_GPU_V2_REG_R1, red);