Add conditional for linux/winows compile

half-duplex
Phil Taylor 2021-06-05 08:26:39 +01:00
rodzic 4159e535fc
commit ef3beecc64
2 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -54,6 +54,7 @@ void shuttle::run()
if (!handle) {
handle = hid_open(0x0C26, 0x001E, NULL);
if (!handle) {
// No devices found, schedule another check in 1000ms
QTimer::singleShot(1000, this, SLOT(run()));
}
else {

Wyświetl plik

@ -5,7 +5,11 @@
#include <QThread>
#include <QCoreApplication>
#include <QTimer>
#ifdef Q_OS_LINUX
#include "hidapi/hidapi.h"
#else
#include "hidapi.h"
#endif
#ifndef Q_OS_WIN
//Headers needed for sleeping.