Adding DEBUG logging & detection fixes to resolve #1592

+ Logitech detection and set up includes debug logging for troubleshooting
+ Adding a pre check to LogitechLightspeedController::GetSerialString()

* Rearranging check logic to ensure that all usages per device are bundled
* Adding PID check to usage bundle to ensure we don't roll into the next device in hid_device_info
- Code cleanup to remove dev_use1 post detection & decoupling the bundled usages for wired lightspeed devices
* Changing wired lightspeed devices to REGISTER_HID_DETECTOR_IPU to target the correct FAP long message usage

+ Adding device validity check isValid() from @cheerpipe
+ Adding wireless check into connected() prior to initialising device
+ Adding the getDeviceFeatureList() back into the Logitech Lightspeed device set up
+ Changed getRGBconfig() for more robust detection

+ Adding Powerplay Mat virtual PID for Linux
+ Adding Logitech G733 for testing @ I=2 P=0xFF43 U=514
+ Adding LOGITECH_POWERPLAY_MAT_VIRTUAL_PID to Linux detection
+ Adding LOGITECH_POWERPLAY_MAT_VIRTUAL_PID and LOGITECH_G733_PID to 60-openrgb.rules
+ Adding LOGITECH_DEVICE_TYPE mapping and extending validity to include new HEADSET type
This commit is contained in:
Chris
2021-07-26 00:08:33 +10:00
parent c63aba1066
commit 41ac14dd41
7 changed files with 337 additions and 135 deletions

View File

@@ -29,18 +29,27 @@ std::string LogitechLightspeedController::GetDeviceLocation()
std::string LogitechLightspeedController::GetSerialString()
{
wchar_t serial_string[128];
int ret = hid_get_serial_number_string(dev, serial_string, 128);
if(ret != 0)
if (lightspeed->device_index == 255 && lightspeed->wireless)
{
LOG_DEBUG("[%s] Skipped get serial number as this is the reciever", lightspeed->device_name.c_str());
return("");
}
else
{
wchar_t serial_string[128];
int ret = hid_get_serial_number_string(dev, serial_string, 128);
LOG_DEBUG("[%s] hid_get_serial_number_string Returned status - %i : %s", lightspeed->device_name.c_str(), ret, ((ret == 0) ? "SUCCESS" : "FAILED"));
std::wstring return_wstring = serial_string;
std::string return_string(return_wstring.begin(), return_wstring.end());
if(ret != 0)
{
return("");
}
return(return_string);
std::wstring return_wstring = serial_string;
std::string return_string(return_wstring.begin(), return_wstring.end());
return(return_string);
}
}
void LogitechLightspeedController::SendMouseMode