Add HID: prefix to all HID detector locations
This commit is contained in:
parent
3345fe6562
commit
ca3c2ad541
49 changed files with 76 additions and 54 deletions
|
|
@ -41,7 +41,7 @@ AMDWraithPrismController::~AMDWraithPrismController()
|
|||
|
||||
std::string AMDWraithPrismController::GetLocationString()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
char* AMDWraithPrismController::GetDeviceName()
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@
|
|||
#include "AsusAuraCoreController.h"
|
||||
#include <cstring>
|
||||
|
||||
AuraCoreController::AuraCoreController(hid_device* dev_handle)
|
||||
AuraCoreController::AuraCoreController(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
dev = dev_handle;
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
}
|
||||
|
||||
AuraCoreController::~AuraCoreController()
|
||||
|
|
@ -20,6 +21,11 @@ AuraCoreController::~AuraCoreController()
|
|||
|
||||
}
|
||||
|
||||
std::string AuraCoreController::GetDeviceLocation()
|
||||
{
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void AuraCoreController::SendBrightness
|
||||
(
|
||||
unsigned char brightness
|
||||
|
|
|
|||
|
|
@ -48,9 +48,11 @@ enum
|
|||
class AuraCoreController
|
||||
{
|
||||
public:
|
||||
AuraCoreController(hid_device* dev_handle);
|
||||
AuraCoreController(hid_device* dev_handle, const char* path);
|
||||
~AuraCoreController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
|
||||
void SendBrightness
|
||||
(
|
||||
unsigned char brightness
|
||||
|
|
@ -72,5 +74,6 @@ public:
|
|||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ void DetectAsusAuraCoreControllers(hid_device_info* info, const std::string&)
|
|||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
{
|
||||
AuraCoreController* controller = new AuraCoreController(dev);
|
||||
AuraCoreController* controller = new AuraCoreController(dev, info->path);
|
||||
RGBController_AuraCore* rgb_controller = new RGBController_AuraCore(controller);
|
||||
// Constructor sets the name
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ RGBController_AuraCore::RGBController_AuraCore(AuraCoreController* aura_ptr)
|
|||
vendor = "ASUS";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "ASUS Aura Core Device";
|
||||
location = aura->GetDeviceLocation();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ AuraMouseController::~AuraMouseController()
|
|||
|
||||
std::string AuraMouseController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void AuraMouseController::SendUpdate
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ unsigned int AuraUSBController::GetChannelCount()
|
|||
|
||||
std::string AuraUSBController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AuraUSBController::GetDeviceName()
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ std::string CMARGBController::GetSerial()
|
|||
|
||||
std::string CMARGBController::GetLocation()
|
||||
{
|
||||
return location;
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
unsigned char CMARGBController::GetZoneIndex()
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ std::string CMMP750Controller::GetSerial()
|
|||
|
||||
std::string CMMP750Controller::GetLocation()
|
||||
{
|
||||
return location;
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
unsigned char CMMP750Controller::GetMode()
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ std::string CorsairLightingNodeController::GetFirmwareString()
|
|||
|
||||
std::string CorsairLightingNodeController::GetLocationString()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void CorsairLightingNodeController::SetChannelEffect(unsigned char channel,
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ device_type CorsairPeripheralController::GetDeviceType()
|
|||
|
||||
std::string CorsairPeripheralController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
int CorsairPeripheralController::GetPhysicalLayout()
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ DuckyKeyboardController::~DuckyKeyboardController()
|
|||
|
||||
std::string DuckyKeyboardController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void DuckyKeyboardController::SendColors
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ std::string EKController::GetSerial()
|
|||
|
||||
std::string EKController::GetLocation()
|
||||
{
|
||||
return location;
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void EKController::SetMode(unsigned char mode, unsigned char speed)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ ATC800Controller::~ATC800Controller()
|
|||
|
||||
std::string ATC800Controller::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void ATC800Controller::SendCoolerMode
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ RGBFusion2USBController::RGBFusion2USBController(hid_device* handle, const char
|
|||
D_LED1_count = LedCountToEnum(report.total_leds & 0x0F);
|
||||
D_LED2_count = LedCountToEnum(report.total_leds & 0xF0);
|
||||
}
|
||||
loc = path;
|
||||
location = path;
|
||||
|
||||
EnableBeat(false);
|
||||
}
|
||||
|
|
@ -157,7 +157,7 @@ std::string RGBFusion2USBController::GetFWVersion()
|
|||
|
||||
std::string RGBFusion2USBController::GetDeviceLocation()
|
||||
{
|
||||
return(loc);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string RGBFusion2USBController::GetSerial()
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ private:
|
|||
IT8297Report report;
|
||||
std::string name;
|
||||
std::string description;
|
||||
std::string loc;
|
||||
std::string location;
|
||||
std::string version;
|
||||
std::string chip_id;
|
||||
int effect_disabled = 0;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ HoltekA070Controller::HoltekA070Controller(hid_device* dev_handle, const char* p
|
|||
|
||||
std::string HoltekA070Controller::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------*\
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ HyperXAlloyOriginsController::~HyperXAlloyOriginsController()
|
|||
|
||||
std::string HyperXAlloyOriginsController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID " + location);
|
||||
}
|
||||
|
||||
void HyperXAlloyOriginsController::SetLEDsDirect(std::vector<RGBColor> colors)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ HyperXKeyboardController::~HyperXKeyboardController()
|
|||
|
||||
std::string HyperXKeyboardController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void HyperXKeyboardController::SetMode
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ HyperXPulsefireSurgeController::~HyperXPulsefireSurgeController()
|
|||
|
||||
std::string HyperXPulsefireSurgeController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID " + location);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------*\
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ HyperXMousematController::~HyperXMousematController()
|
|||
|
||||
std::string HyperXMousematController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID " + location);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------*\
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ void DetectLogitechKeyboardG213(hid_device_info* info, const std::string& name)
|
|||
hid_device* dev = hid_open_path(info->path);
|
||||
if(dev)
|
||||
{
|
||||
LogitechG213Controller* controller = new LogitechG213Controller(dev);
|
||||
LogitechG213Controller* controller = new LogitechG213Controller(dev, info->path);
|
||||
RGBController_LogitechG213* rgb_controller = new RGBController_LogitechG213(controller);
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ LogitechG203Controller::LogitechG203Controller(hid_device* dev_handle, const cha
|
|||
|
||||
std::string LogitechG203Controller::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID " + location);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------*\
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ LogitechG203LController::LogitechG203LController(hid_device* dev_handle, const c
|
|||
|
||||
std::string LogitechG203LController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void LogitechG203LController::SendApply()
|
||||
|
|
@ -143,4 +143,4 @@ void LogitechG203LController::SetDevice(std::vector<RGBColor> colors)
|
|||
hid_read(dev, usb_buf, 20);
|
||||
|
||||
SendApply();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,14 +9,20 @@
|
|||
#include "LogitechG213Controller.h"
|
||||
#include <cstring>
|
||||
|
||||
LogitechG213Controller::LogitechG213Controller(hid_device* dev_handle)
|
||||
LogitechG213Controller::LogitechG213Controller(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
dev = dev_handle;
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
}
|
||||
|
||||
LogitechG213Controller::~LogitechG213Controller()
|
||||
{
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
std::string LogitechG213Controller::GetDeviceLocation()
|
||||
{
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void LogitechG213Controller::SetDirect
|
||||
|
|
|
|||
|
|
@ -16,9 +16,11 @@
|
|||
class LogitechG213Controller
|
||||
{
|
||||
public:
|
||||
LogitechG213Controller(hid_device* dev_handle);
|
||||
LogitechG213Controller(hid_device* dev_handle, const char* path);
|
||||
~LogitechG213Controller();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
|
||||
void SetDirect
|
||||
(
|
||||
unsigned char zone,
|
||||
|
|
@ -29,5 +31,6 @@ public:
|
|||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ LogitechG403Controller::~LogitechG403Controller()
|
|||
|
||||
std::string LogitechG403Controller::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void LogitechG403Controller::SendMouseMode
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ LogitechG502PSController::~LogitechG502PSController()
|
|||
|
||||
std::string LogitechG502PSController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void LogitechG502PSController::SendMouseMode
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ LogitechGPowerPlayController::~LogitechGPowerPlayController()
|
|||
|
||||
std::string LogitechGPowerPlayController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void LogitechGPowerPlayController::SendMouseMatMode
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ LogitechGProWirelessController::~LogitechGProWirelessController()
|
|||
|
||||
std::string LogitechGProWirelessController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void LogitechGProWirelessController::SendMouseMode
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ RGBController_LogitechG213::RGBController_LogitechG213(LogitechG213Controller* l
|
|||
vendor = "Logitech";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Logitech G213 Keyboard Device";
|
||||
location = logitechG213->GetDeviceLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ char* MSI3ZoneController::GetDeviceName()
|
|||
|
||||
std::string MSI3ZoneController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void MSI3ZoneController::SetLEDs(std::vector<RGBColor> colors)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ MSIMysticLightController::MSIMysticLightController(hid_device* handle, const cha
|
|||
|
||||
if(dev)
|
||||
{
|
||||
loc = path;
|
||||
location = path;
|
||||
|
||||
ReadName();
|
||||
ReadSerial();
|
||||
|
|
@ -123,7 +123,7 @@ std::string MSIMysticLightController::GetFWVersion()
|
|||
|
||||
std::string MSIMysticLightController::GetDeviceLocation()
|
||||
{
|
||||
return loc;
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string MSIMysticLightController::GetSerial()
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ private:
|
|||
|
||||
hid_device* dev;
|
||||
std::string name;
|
||||
std::string loc;
|
||||
std::string location;
|
||||
std::string version_APROM;
|
||||
std::string version_LDROM;
|
||||
std::string chip_id;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ unsigned short NZXTHue2Controller::GetFanRPM
|
|||
|
||||
std::string NZXTHue2Controller::GetLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
unsigned int NZXTHue2Controller::GetNumFanChannels()
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ std::string NZXTKrakenController::GetFirmwareVersion()
|
|||
|
||||
std::string NZXTKrakenController::GetLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void NZXTKrakenController::UpdateStatus()
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ RedragonK556Controller::RedragonK556Controller(hid_device* dev_handle, const cha
|
|||
|
||||
std::string RedragonK556Controller::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void RedragonK556Controller::SetKeyboardColors
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ RedragonM711Controller::RedragonM711Controller(hid_device* dev_handle, const cha
|
|||
|
||||
std::string RedragonM711Controller::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void RedragonM711Controller::SendMouseColor
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ std::string RoccatKoneAimoController::GetSerial()
|
|||
|
||||
std::string RoccatKoneAimoController::GetLocation()
|
||||
{
|
||||
return location;
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void RoccatKoneAimoController::SendInit()
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ SinowealthController::~SinowealthController()
|
|||
|
||||
std::string SinowealthController::GetLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
unsigned int SinowealthController::GetLEDCount()
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ SonyDS4Controller::SonyDS4Controller(hid_device * device_handle, const char * de
|
|||
location = device_path;
|
||||
}
|
||||
|
||||
const char * SonyDS4Controller::GetLocation()
|
||||
std::string SonyDS4Controller::GetLocation()
|
||||
{
|
||||
return location;
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void SonyDS4Controller::SetColors(unsigned char red, unsigned char green, unsigned char blue)
|
||||
|
|
|
|||
|
|
@ -8,19 +8,21 @@
|
|||
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
class SonyDS4Controller
|
||||
{
|
||||
public:
|
||||
SonyDS4Controller(hid_device * device_handle, const char * device_path);
|
||||
|
||||
const char* GetLocation();
|
||||
std::string GetLocation();
|
||||
|
||||
void SetColors(unsigned char red, unsigned char green, unsigned char blue);
|
||||
|
||||
private:
|
||||
hid_device* device_handle;
|
||||
bool is_bluetooth = false;
|
||||
const char* location;
|
||||
std::string location;
|
||||
|
||||
void sendReportUSB(unsigned char red, unsigned char green, unsigned char blue);
|
||||
void sendReportBT(unsigned char red, unsigned char green, unsigned char blue);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public:
|
|||
|
||||
std::string GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
};
|
||||
|
||||
steelseries_type proto_type;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ SteelSeriesOldApexController::~SteelSeriesOldApexController()
|
|||
|
||||
std::string SteelSeriesOldApexController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
char* SteelSeriesOldApexController::GetDeviceName()
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ SteelSeriesRivalController::~SteelSeriesRivalController()
|
|||
|
||||
std::string SteelSeriesRivalController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
char* SteelSeriesRivalController::GetDeviceName()
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ SteelSeriesSiberiaController::~SteelSeriesSiberiaController()
|
|||
|
||||
std::string SteelSeriesSiberiaController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
char* SteelSeriesSiberiaController::GetDeviceName()
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ std::string TecknetController::GetSerial()
|
|||
|
||||
std::string TecknetController::GetLocation()
|
||||
{
|
||||
return location;
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void TecknetController::SetMode(unsigned char mode, unsigned char speed, unsigned char brightness)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ PoseidonZRGBController::~PoseidonZRGBController()
|
|||
|
||||
std::string PoseidonZRGBController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void PoseidonZRGBController::SetMode(unsigned char mode, unsigned char direction, unsigned char speed)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ ThermaltakeRiingController::~ThermaltakeRiingController()
|
|||
|
||||
std::string ThermaltakeRiingController::GetDeviceLocation()
|
||||
{
|
||||
return(location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
void ThermaltakeRiingController::SetChannelLEDs(unsigned char channel, RGBColor * colors, unsigned int num_colors)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue