Store name in KeychronKeyboardController to avoid setting it in detector
This commit is contained in:
parent
ca73941e5d
commit
a1f144daf2
4 changed files with 15 additions and 14 deletions
|
|
@ -15,11 +15,11 @@
|
|||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
KeychronKeyboardController::KeychronKeyboardController(hid_device* dev_handle, const hid_device_info& info)
|
||||
KeychronKeyboardController::KeychronKeyboardController(hid_device* dev_handle, const hid_device_info& info, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
version = "";
|
||||
location = info.path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
KeychronKeyboardController::~KeychronKeyboardController()
|
||||
|
|
@ -32,6 +32,11 @@ std::string KeychronKeyboardController::GetDeviceLocation()
|
|||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string KeychronKeyboardController::GetNameString()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string KeychronKeyboardController::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
|
|
@ -45,11 +50,6 @@ std::string KeychronKeyboardController::GetSerialString()
|
|||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
std::string KeychronKeyboardController::GetFirmwareVersion()
|
||||
{
|
||||
return(version);
|
||||
}
|
||||
|
||||
void KeychronKeyboardController:: SetLedSequencePositions(std::vector<unsigned int> positions)
|
||||
{
|
||||
led_sequence_positions = positions;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue