Store name in CorsairCommanderCoreController to avoid setting it in detector, fix detector name

This commit is contained in:
Adam Honse 2025-08-04 17:15:20 -05:00
parent 526d35edfe
commit e44fd9ed78
4 changed files with 20 additions and 13 deletions

View file

@ -17,10 +17,11 @@
using namespace std::chrono_literals;
CorsairCommanderCoreController::CorsairCommanderCoreController(hid_device* dev_handle, const char* path, int pid)
CorsairCommanderCoreController::CorsairCommanderCoreController(hid_device* dev_handle, const char* path, int pid, std::string dev_name)
{
dev = dev_handle;
location = path;
name = dev_name;
keepalive_thread_run = 1;
controller_ready = 0;
packet_size = CORSAIR_COMMANDER_CORE_PACKET_SIZE_V2;
@ -100,6 +101,11 @@ std::string CorsairCommanderCoreController::GetLocationString()
return("HID: " + location);
}
std::string CorsairCommanderCoreController::GetNameString()
{
return(name);
}
std::vector<unsigned short int> CorsairCommanderCoreController::GetLedCounts()
{
/*-----------------------------------------------------*\