Rework EVGAGP102GPUController to use I2C PCI detector and store name in controller to avoid setting it in detector

This commit is contained in:
Adam Honse
2025-08-07 11:46:12 -05:00
parent c94eed432d
commit c32663bb32
6 changed files with 82 additions and 98 deletions

View File

@@ -12,10 +12,11 @@
#include "EVGAGP102Controller.h"
#include "LogManager.h"
EVGAGP102Controller::EVGAGP102Controller(i2c_smbus_interface* bus_ptr, zoneinfo info)
EVGAGP102Controller::EVGAGP102Controller(i2c_smbus_interface* bus_ptr, zoneinfo info, std::string dev_name)
{
bus = bus_ptr;
zi = info;
bus = bus_ptr;
zi = info;
name = dev_name;
}
EVGAGP102Controller::~EVGAGP102Controller()
@@ -32,6 +33,16 @@ std::string EVGAGP102Controller::GetDeviceLocation()
return("I2C: " + return_string);
}
std::string EVGAGP102Controller::GetDeviceName()
{
return(name);
}
std::string EVGAGP102Controller::GetZoneName()
{
return(zi.zone_name);
}
void EVGAGP102Controller::SetColor(unsigned char red, unsigned char green, unsigned char blue)
{
SendCommand(EVGA_GP102_CMD_BEGIN);
@@ -125,8 +136,3 @@ void EVGAGP102Controller::SaveSettings()
//bus->i2c_smbus_write_byte_data(zi.dev_addr, 0x21, 0xE5);
//bus->i2c_smbus_write_byte_data(zi.dev_addr, 0x22, 0xE7);
}
std::string EVGAGP102Controller::GetName()
{
return zi.zone_name;
}