Store name in SRGBmodsControllers to avoid setting it in detectors
This commit is contained in:
parent
840512751c
commit
1bd9215a72
7 changed files with 34 additions and 20 deletions
|
|
@ -26,7 +26,7 @@ RGBController_SRGBmodsLEDControllerV1::RGBController_SRGBmodsLEDControllerV1(SRG
|
|||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "SRGBmods Device";
|
||||
name = controller->GetNameString();
|
||||
vendor = "SRGBmods.net";
|
||||
description = "SRGBmods LED Controller V1 Device";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
|
|
|
|||
|
|
@ -15,10 +15,11 @@
|
|||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
SRGBmodsLEDControllerV1::SRGBmodsLEDControllerV1(hid_device* dev_handle, const char* path)
|
||||
SRGBmodsLEDControllerV1::SRGBmodsLEDControllerV1(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
SRGBmodsLEDControllerV1::~SRGBmodsLEDControllerV1()
|
||||
|
|
@ -31,6 +32,11 @@ std::string SRGBmodsLEDControllerV1::GetLocationString()
|
|||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string SRGBmodsLEDControllerV1::GetNameString()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string SRGBmodsLEDControllerV1::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
|
|
|||
|
|
@ -28,10 +28,11 @@ enum
|
|||
class SRGBmodsLEDControllerV1
|
||||
{
|
||||
public:
|
||||
SRGBmodsLEDControllerV1(hid_device* dev_handle, const char* path);
|
||||
SRGBmodsLEDControllerV1(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~SRGBmodsLEDControllerV1();
|
||||
|
||||
std::string GetLocationString();
|
||||
std::string GetNameString();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SetChannelLEDs(unsigned char channel, RGBColor * colors, unsigned int num_colors);
|
||||
|
|
@ -41,6 +42,7 @@ public:
|
|||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void SendPacket
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue