Store name in GigabyteAorusCPUCoolerController to avoid setting it in detector
This commit is contained in:
parent
6f9e164874
commit
7d0db424ec
4 changed files with 20 additions and 13 deletions
|
|
@ -13,10 +13,11 @@
|
||||||
#include "ATC800Controller.h"
|
#include "ATC800Controller.h"
|
||||||
#include "StringUtils.h"
|
#include "StringUtils.h"
|
||||||
|
|
||||||
ATC800Controller::ATC800Controller(hid_device* dev_handle, const char* path)
|
ATC800Controller::ATC800Controller(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||||
{
|
{
|
||||||
dev = dev_handle;
|
dev = dev_handle;
|
||||||
location = path;
|
location = path;
|
||||||
|
name = dev_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
ATC800Controller::~ATC800Controller()
|
ATC800Controller::~ATC800Controller()
|
||||||
|
|
@ -29,6 +30,11 @@ std::string ATC800Controller::GetDeviceLocation()
|
||||||
return("HID: " + location);
|
return("HID: " + location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ATC800Controller::GetNameString()
|
||||||
|
{
|
||||||
|
return(name);
|
||||||
|
}
|
||||||
|
|
||||||
std::string ATC800Controller::GetSerialString()
|
std::string ATC800Controller::GetSerialString()
|
||||||
{
|
{
|
||||||
wchar_t serial_string[128];
|
wchar_t serial_string[128];
|
||||||
|
|
|
||||||
|
|
@ -61,10 +61,11 @@ enum
|
||||||
class ATC800Controller
|
class ATC800Controller
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ATC800Controller(hid_device* dev_handle, const char* path);
|
ATC800Controller(hid_device* dev_handle, const char* path, std::string name);
|
||||||
~ATC800Controller();
|
~ATC800Controller();
|
||||||
|
|
||||||
std::string GetDeviceLocation();
|
std::string GetDeviceLocation();
|
||||||
|
std::string GetNameString();
|
||||||
std::string GetSerialString();
|
std::string GetSerialString();
|
||||||
|
|
||||||
void DisableTempRPMIndicator();
|
void DisableTempRPMIndicator();
|
||||||
|
|
@ -75,6 +76,7 @@ public:
|
||||||
void SendCoolerMode(uint8_t zone, uint8_t mode, aorus_atc800_mode_config zone_config);
|
void SendCoolerMode(uint8_t zone, uint8_t mode, aorus_atc800_mode_config zone_config);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
hid_device* dev;
|
hid_device* dev;
|
||||||
std::string location;
|
std::string location;
|
||||||
|
std::string name;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,8 @@ void DetectGigabyteAorusCPUCoolerControllers(hid_device_info* info, const std::s
|
||||||
|
|
||||||
if(dev)
|
if(dev)
|
||||||
{
|
{
|
||||||
ATC800Controller* controller = new ATC800Controller(dev, info->path);
|
ATC800Controller* controller = new ATC800Controller(dev, info->path, name);
|
||||||
RGBController_AorusATC800* rgb_controller = new RGBController_AorusATC800(controller);
|
RGBController_AorusATC800* rgb_controller = new RGBController_AorusATC800(controller);
|
||||||
rgb_controller->name = name;
|
|
||||||
|
|
||||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,14 +24,14 @@
|
||||||
|
|
||||||
RGBController_AorusATC800::RGBController_AorusATC800(ATC800Controller* controller_ptr)
|
RGBController_AorusATC800::RGBController_AorusATC800(ATC800Controller* controller_ptr)
|
||||||
{
|
{
|
||||||
controller = controller_ptr;
|
controller = controller_ptr;
|
||||||
|
|
||||||
name = "Aorus ATC800 CPU Cooler";
|
name = controller->GetNameString();
|
||||||
vendor = "Gigabyte";
|
vendor = "Gigabyte";
|
||||||
type = DEVICE_TYPE_COOLER;
|
type = DEVICE_TYPE_COOLER;
|
||||||
description = "Aorus ATC800 CPU Cooler";
|
description = "Aorus ATC800 CPU Cooler Device";
|
||||||
location = controller->GetDeviceLocation();
|
location = controller->GetDeviceLocation();
|
||||||
serial = controller->GetSerialString();
|
serial = controller->GetSerialString();
|
||||||
|
|
||||||
mode Custom;
|
mode Custom;
|
||||||
Custom.name = "Custom";
|
Custom.name = "Custom";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue