kopia lustrzana https://gitlab.com/eliggett/wfview
Check hidapi version
rodzic
5654fa524e
commit
69afce7712
|
@ -40,6 +40,22 @@ usbController::~usbController()
|
|||
|
||||
void usbController::init()
|
||||
{
|
||||
if (HID_API_VERSION == HID_API_MAKE_VERSION(hid_version()->major, hid_version()->minor, hid_version()->patch)) {
|
||||
qInfo(logUsbControl) << QString("Compile-time version matches runtime version of hidapi: %0.%1,%2")
|
||||
.arg(hid_version()->major)
|
||||
.arg(hid_version()->minor)
|
||||
.arg(hid_version()->patch);
|
||||
}
|
||||
else {
|
||||
qInfo(logUsbControl) << QString("Compile-time and runtime versions of hidapi do not match (%0.%1.%2 vs %0.%1.%2)")
|
||||
.arg(HID_API_VERSION_MAJOR)
|
||||
.arg(HID_API_VERSION_MINOR)
|
||||
.arg(HID_API_VERSION_PATCH)
|
||||
.arg(hid_version()->major)
|
||||
.arg(hid_version()->minor)
|
||||
.arg(hid_version()->patch);
|
||||
}
|
||||
|
||||
hidStatus = hid_init();
|
||||
if (hidStatus) {
|
||||
qInfo(logUsbControl()) << "Failed to intialize HID Devices";
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#endif
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
//Headers needed for sleeping.
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue