Added linux support and hidapi drivers
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
libhidapi-hidraw.so.0.0.0
|
||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
libhidapi-libusb.so.0.0.0
|
||||
BIN
Binary file not shown.
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user