FIxed formatting
This commit is contained in:
@@ -13,7 +13,7 @@ HidDevice::HidDevice(int vid, const std::vector<int> pids, int interfaceNum, boo
|
|||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
LOG->Warn("HidDevice with vendor_id %04x and pids %s - %d not found", vid, GetPidsString(pids).c_str(), interfaceNum);
|
LOG->Warn("HidDevice with vendor_id %04x and pids %s: %d not found", vid, GetPidsString(pids).c_str(), interfaceNum);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
foundOnce = true;
|
foundOnce = true;
|
||||||
@@ -45,10 +45,10 @@ bool HidDevice::Open(const char* path)
|
|||||||
{
|
{
|
||||||
handle = hid_open_path(path);
|
handle = hid_open_path(path);
|
||||||
|
|
||||||
if(nonBlockingRead)
|
if (nonBlockingRead)
|
||||||
hid_set_nonblocking(handle, 1);
|
hid_set_nonblocking(handle, 1);
|
||||||
|
|
||||||
if(handle)
|
if (handle)
|
||||||
LOG->Info("HidDevice %04x:%04x: %d opened by path %s", foundDeviceInfo.vid, foundDeviceInfo.pid, foundDeviceInfo.interfaceNum, foundDeviceInfo.path);
|
LOG->Info("HidDevice %04x:%04x: %d opened by path %s", foundDeviceInfo.vid, foundDeviceInfo.pid, foundDeviceInfo.interfaceNum, foundDeviceInfo.path);
|
||||||
|
|
||||||
return handle != nullptr;
|
return handle != nullptr;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ static std::vector<int> make_pids(int base_pid, int size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct HidDeviceInfo {
|
struct HidDeviceInfo {
|
||||||
char* path{nullptr};
|
char* path{ nullptr };
|
||||||
int pid;
|
int pid;
|
||||||
int vid;
|
int vid;
|
||||||
int interfaceNum;
|
int interfaceNum;
|
||||||
@@ -31,7 +31,7 @@ class HidDevice
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
HidDeviceInfo foundDeviceInfo{};
|
HidDeviceInfo foundDeviceInfo{};
|
||||||
hid_device* handle{nullptr};
|
hid_device* handle{ nullptr };
|
||||||
|
|
||||||
static const RString GetPidsString(const std::vector<int> pids);
|
static const RString GetPidsString(const std::vector<int> pids);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user