Added linux support and hidapi drivers

This commit is contained in:
Koen van der Kruk
2017-04-30 22:48:24 +02:00
parent b931cf2659
commit f743500963
8 changed files with 17 additions and 7 deletions
+7 -2
View File
@@ -32,14 +32,19 @@ RESOURCES += \
win32 {
!contains(QMAKE_TARGET.arch, x86_64) {
message("x86 build")
message("Windows - x86 build")
LIBS += -L"$$PWD/lib/windows/x86/" -lhidapi
} else {
message("x86_64 build")
message("Windows - x86_64 build")
LIBS += -L"$$PWD/lib/windows/x64/" -lhidapi
}
}
linux {
message("Linux build")
LIBS += -L"$$PWD/lib/linux" -lhidapi-hidraw
}
@@ -18,9 +18,9 @@ static const int _3DCONNEXION_SPACEPILOTPRO = 0xc629; // 50729
SpaceMouseController::SpaceMouseController(SpaceMouseListener * listener)
: m_current_listener(listener)
: m_retrieved_data()
, m_thread(nullptr)
, m_retrieved_data()
, m_current_listener(listener)
{
m_mouse_found = initialize();
+3 -3
View File
@@ -39,9 +39,9 @@ void MainWidget::spaceMouseMovement(const int &TX, const int &TY, const int &TZ,
rotationAxis = (object_rotation).normalized();
qDebug() << "rotationAxis: " << rotationAxis;
TX;
TY;
TZ;
(void)TX;
(void)TY;
(void)TZ;
}
void MainWidget::spaceMouseButton(const int &id)
+1
View File
@@ -0,0 +1 @@
libhidapi-hidraw.so.0.0.0
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
libhidapi-libusb.so.0.0.0
Binary file not shown.
+3
View File
@@ -12,6 +12,9 @@ int main(int argc, char *argv[])
QSurfaceFormat::setDefaultFormat(format);
SpaceMouseController * current_controller = new SpaceMouseController(&w);
//just using the variable to disable the compiler warning current-controller isn't used.
(void)current_controller;
w.show();
return a.exec();
}