Commit 0a91721a authored by Bryant's avatar Bryant

Improvements to libxbee compilation.

XBee support can now be disabled by defining DISABLE_XBEE.
Details on why XBee support is disabled are now output.
parent 1d0f0fd8
......@@ -367,38 +367,47 @@ WindowsBuild {
#
# XBee wireless
#
WindowsBuild | LinuxBuild {
message(Including support for XBee)
DEFINES += XBEELINK
INCLUDEPATH += libs/thirdParty/libxbee
HEADERS += \
src/comm/XbeeLinkInterface.h \
src/comm/XbeeLink.h \
src/comm/HexSpinBox.h \
src/ui/XbeeConfigurationWindow.h \
src/comm/CallConv.h
SOURCES += \
src/comm/XbeeLink.cpp \
src/comm/HexSpinBox.cpp \
src/ui/XbeeConfigurationWindow.cpp
WindowsBuild {
# XBee wireless support. This is not necessary for basic serial/UART communications.
# It's only required for speaking directly to the Xbee using their proprietary API.
# Unsupported on Mac.
# Installation on Windows is unnecessary, as we just link to our included .dlls directly.
# Installing on Linux involves running `make;sudo make install` in `libs/thirdParty/libxbee`
# Uninstalling from Linux can be done with `sudo make uninstall`.
#
XBEE_DEPENDENT_HEADERS += \
src/comm/XbeeLinkInterface.h \
src/comm/XbeeLink.h \
src/comm/HexSpinBox.h \
src/ui/XbeeConfigurationWindow.h \
src/comm/CallConv.h
XBEE_DEPENDENT_SOURCES += \
src/comm/XbeeLink.cpp \
src/comm/HexSpinBox.cpp \
src/ui/XbeeConfigurationWindow.cpp
XBEE_DEFINES = XBEELINK
contains(DEFINES, DISABLE_XBEE) {
message("Skipping support for native XBee API (manual override)")
} else:LinuxBuild {
exists(/usr/include/xbee.h) {
message("Including support for XBee API")
HEADERS += $$XBEE_DEPENDENT_HEADERS
SOURCES += $$XBEE_DEPENDENT_SOURCES
DEFINES += $$XBEE_DEFINES
LIBS += -lxbee
} else {
warning("Skipping support for XBee API (missing library, see README)")
}
} else:WindowsBuild {
message("Including support for XBee API")
HEADERS += $$XBEE_DEPENDENT_HEADERS
SOURCES += $$XBEE_DEPENDENT_SOURCES
DEFINES += $$XBEE_DEFINES
INCLUDEPATH += libs/thirdParty/libxbee
LIBS += -l$$BASEDIR/libs/thirdParty/libxbee/lib/libxbee
}
LinuxBuild {
LIBS += -L$$BASEDIR/libs/thirdParty/libxbee/lib \
-lxbee
}
} else {
message(Skipping support for XBee)
message("Skipping support for XBee API (unsupported platform)")
}
#
......
......@@ -40,6 +40,11 @@ The `MAVLINK_CONF` variable can also be specified at the command line as an argu
### Speech syntehsis
QGroundcontrol can notify the controller of information via speech synthesis on the Mac and Linux platforms. This requires the `flite` library on Linux while on Mac text-to-speech support is built in starting with OS 10.6+ (Snow Leopard). This support is enabled by default on all platforms if the dependencies are met. Disabling this functionality can be done by adding the `DISABLE_SPEECH` define when running `qmake` like: `qmake DEFINES=DISABLE_SPEECH`. Note that multiple defines can be specified like this: `qmake DEFINES="DISABLE_QUPGRADE DISABLE_SPEECH"`.
### 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.
To disable XBee support you may specify `DISABLE_XBEE` in the DEFINES argument to qmake like `qmake DEFINES=DISABLE_XBEE`. Multiple options may be specified for `DEFINES` like: `qmake DEFINES="DISABLE_XBEE DISABLE_SPEECH".
# Build on Mac OSX
To build on Mac OSX (10.6 or later):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment