From 6588c633ac0ab351df27ffd08699f4c99110dc91 Mon Sep 17 00:00:00 2001 From: Bryant Date: Mon, 3 Feb 2014 20:54:59 -0800 Subject: [PATCH] Allowed 3D mouse support to be optional. --- QGCExternalLibs.pri | 34 +++++++++++++++++++--------------- README.md | 5 +++++ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/QGCExternalLibs.pri b/QGCExternalLibs.pri index 1d75f200f..f84270118 100644 --- a/QGCExternalLibs.pri +++ b/QGCExternalLibs.pri @@ -414,24 +414,26 @@ contains(DEFINES, DISABLE_XBEE) { } # -# 3DConnexion 3d Mice support +# [OPTIONAL] Magellan 3DxWare library. Provides support for 3DConnexion's 3D mice. # +contains(DEFINES, DISABLE_3DMOUSE) { + message("Skipping support for 3DConnexion mice (manual override)") +} else:LinuxBuild { + exists(/usr/local/lib/libxdrvlib.so) { + message("Including support for 3DConnexion mice") -LinuxBuild : exists(/usr/local/lib/libxdrvlib.so) { - message("Including support for Magellan 3DxWare") - - DEFINES += - MOUSE_ENABLED_LINUX \ - ParameterCheck # Hack: Has to be defined for magellan usage + DEFINES += + MOUSE_ENABLED_LINUX \ + ParameterCheck # Hack: Has to be defined for magellan usage - INCLUDEPATH *= /usr/local/include - HEADERS += src/input/Mouse6dofInput.h - SOURCES += src/input/Mouse6dofInput.cpp - LIBS += -L/usr/local/lib/ -lxdrvlib -} - -WindowsBuild { - message("Including support for Magellan 3DxWare") + HEADERS += src/input/Mouse6dofInput.h + SOURCES += src/input/Mouse6dofInput.cpp + LIBS += -L/usr/local/lib/ -lxdrvlib + } else { + warning("Skipping support for 3DConnexion mice (missing libraries, see README)") + } +} else:WindowsBuild { + message("Including support for 3DConnexion mice") DEFINES += MOUSE_ENABLED_WIN @@ -447,6 +449,8 @@ WindowsBuild { libs/thirdParty/3DMouse/win/MouseParameters.cpp \ libs/thirdParty/3DMouse/win/Mouse3DInput.cpp \ src/input/Mouse6dofInput.cpp +} else { + message("Skipping support for 3DConnexion mice (unsupported platform)") } # diff --git a/README.md b/README.md index ea1df6b45..f59a66854 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,11 @@ Microsoft's Kinect can be used by some autopilots for additional functionality. This support is enabled by default and built-in when the appropriate libraries exist. To disable this behavior set the DISABLE_KINECT define when running qmake. +### 3D mouse support +Connexion's 3D mice are supported through the 3DxWARE driver available on Linux and Windows. Download and install the driver from 3DConnexion to enable support. + +This support is enabled by default with driver installation. To disable define DISABLE_3DMOUSE when running qmake. + ### XBee support QGroundControl can talk to XBee wireless devices using their proprietary protocol directly on Windows and Linux platforms. This support is not necessary if you're not using XBee devices or aren't using their proprietary protocol. On Windows, the necessary dependencies are included in this repository and no additional steps are required. For Linux, change to the `libs/thirdParty/libxbee` folder and run `make;sudo make install` to install libxbee on your system (uninstalling can be done with a `sudo make uninstall`). qmake will automatically detect the library on Linux, so no other work is necessary. -- 2.22.0