Store name in CryorigH7QuadLumiController to avoid setting it in detector
This commit is contained in:
parent
dc0103a155
commit
ea206235c5
4 changed files with 12 additions and 5 deletions
|
|
@ -17,10 +17,11 @@
|
|||
#include "LogManager.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
CryorigH7QuadLumiController::CryorigH7QuadLumiController(hid_device* dev_handle, const char* path)
|
||||
CryorigH7QuadLumiController::CryorigH7QuadLumiController(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
|
||||
SendFirmwareRequest();
|
||||
}
|
||||
|
|
@ -35,6 +36,11 @@ std::string CryorigH7QuadLumiController::GetLocation()
|
|||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string CryorigH7QuadLumiController::GetName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string CryorigH7QuadLumiController::GetFirmwareVersion()
|
||||
{
|
||||
return(firmware_version);
|
||||
|
|
|
|||
|
|
@ -48,11 +48,12 @@ enum
|
|||
class CryorigH7QuadLumiController
|
||||
{
|
||||
public:
|
||||
CryorigH7QuadLumiController(hid_device* dev_handle, const char* path);
|
||||
CryorigH7QuadLumiController(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~CryorigH7QuadLumiController();
|
||||
|
||||
std::string GetFirmwareVersion();
|
||||
std::string GetLocation();
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SetChannelEffect
|
||||
|
|
@ -77,6 +78,7 @@ private:
|
|||
|
||||
char firmware_version[16];
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void SendPacket
|
||||
(
|
||||
|
|
|
|||
|
|
@ -26,9 +26,8 @@ static void DetectCryorigH7QuadLumi(hid_device_info* info, const std::string& na
|
|||
|
||||
if(dev)
|
||||
{
|
||||
CryorigH7QuadLumiController* controller = new CryorigH7QuadLumiController(dev, info->path);
|
||||
CryorigH7QuadLumiController* controller = new CryorigH7QuadLumiController(dev, info->path, name);
|
||||
RGBController_CryorigH7QuadLumi* rgb_controller = new RGBController_CryorigH7QuadLumi(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ RGBController_CryorigH7QuadLumi::RGBController_CryorigH7QuadLumi(CryorigH7QuadLu
|
|||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "CRYORIG H7 Quad Lumi";
|
||||
name = controller->GetName();
|
||||
vendor = "CRYORIG";
|
||||
type = DEVICE_TYPE_COOLER;
|
||||
description = "CRYORIG H7 Quad Lumi Device";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue