mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 22:24:12 -04:00
Use HID path for Location on Aorus CPU Cooler controller
This commit is contained in:
@@ -11,9 +11,10 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
ATC800Controller::ATC800Controller(hid_device* dev_handle)
|
||||
ATC800Controller::ATC800Controller(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
dev = dev_handle;
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
}
|
||||
|
||||
ATC800Controller::~ATC800Controller()
|
||||
@@ -21,6 +22,11 @@ ATC800Controller::~ATC800Controller()
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
std::string ATC800Controller::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
}
|
||||
|
||||
void ATC800Controller::SendCoolerMode
|
||||
(
|
||||
unsigned char mode,
|
||||
|
||||
@@ -41,9 +41,11 @@ enum
|
||||
class ATC800Controller
|
||||
{
|
||||
public:
|
||||
ATC800Controller(hid_device* dev_handle);
|
||||
ATC800Controller(hid_device* dev_handle, const char* path);
|
||||
~ATC800Controller();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
|
||||
void SendCoolerMode
|
||||
(
|
||||
unsigned char mode,
|
||||
@@ -56,4 +58,5 @@ public:
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
};
|
||||
|
||||
@@ -67,7 +67,7 @@ void DetectAorusCPUCoolerControllers(std::vector<RGBController*>& rgb_controller
|
||||
{
|
||||
case ATC_800_CONTROLLER_PID:
|
||||
{
|
||||
ATC800Controller* controller = new ATC800Controller(dev);
|
||||
ATC800Controller* controller = new ATC800Controller(dev, info->path);
|
||||
|
||||
RGBController_AorusATC800* rgb_controller = new RGBController_AorusATC800(controller);
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ RGBController_AorusATC800::RGBController_AorusATC800(ATC800Controller* cooler_pt
|
||||
name = "Aorus ATC800 CPU Cooler";
|
||||
type = DEVICE_TYPE_COOLER;
|
||||
description = "Aorus ATC800 CPU Cooler";
|
||||
location = cooler->GetDeviceLocation();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
|
||||
Reference in New Issue
Block a user