diff --git a/QGCExternalLibs.pri b/QGCExternalLibs.pri index 137b548b7875a03cf7b3762f911b76855e0671d6..1052b21cf0e6d32fb833ef0c768cb8ec4460b531 100644 --- a/QGCExternalLibs.pri +++ b/QGCExternalLibs.pri @@ -137,18 +137,23 @@ INCLUDEPATH += $$MAVLINKPATH } # -# MAVLink generator (deprecated) +# [DEPRECATED] MAVLink generator UI. Provides a GUI interface for generating MAVLink dialects. +# Replaced by mavgenerator.py within the MAVLink project. # +contains(DEFINES, ENABLE_MAVGEN) { + warning("Including support for MAVLink generator GUI (caution: deprecated)") + DEPENDPATH += \ + src/apps/mavlinkgen -DEPENDPATH += \ - src/apps/mavlinkgen - -INCLUDEPATH += \ - src/apps/mavlinkgen \ - src/apps/mavlinkgen/ui \ - src/apps/mavlinkgen/generator + INCLUDEPATH += \ + src/apps/mavlinkgen \ + src/apps/mavlinkgen/ui \ + src/apps/mavlinkgen/generator -include(src/apps/mavlinkgen/mavlinkgen.pri) + include(src/apps/mavlinkgen/mavlinkgen.pri) +} else { + message("Skipping support for MAVLink generator GUI (deprecated, see README)") +} # # OpenSceneGraph diff --git a/README.md b/README.md index b76d907bd34fb39855dc54b1cfc7904512446ffc..ceb1b16d4c96cea17bea2792791eccf61f7b5c8e 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,11 @@ The MAVLink dialect compiled by default by QGC is for the ardupilotmega. This wi The `MAVLINK_CONF` variable can also be specified at the command line as an argument to qmake to allow for easy one-off compilations: `qmake MAVLINK_CONF="sensesoar ardupilotmega"` +### MAVLink dialect generator +An add-on is available for QGC that provides a UI for generating MAVLink dialects from within QGC. This feature has been deprecated since identical functionality now exists within the MAVLink project itself. + +This is not built by default as it is deprecated functionality that will removed in a forthcoming version of QGC. You can enable it by specifying the ENABLE_MAVGEN constant as an argument to qmake like `qmake DEFINES=ENABLE_MAVGEN`. + ### 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"`. diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index 11bf444a2d130144d1e427de66c015c4a0ae30ed..3fc429628725ed7445c19147e44cfa2538af77c5 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -72,6 +72,11 @@ This file is part of the QGROUNDCONTROL project #include "terminalconsole.h" #include "menuactionhelper.h" +// Add support for the MAVLink generator UI if it's been requested. +#ifdef ENABLE_MAVGEN +#include "XMLCommProtocolWidget.h" +#endif + #ifdef QGC_OSG_ENABLED #include "Q3DWidgetFactory.h" #endif @@ -547,6 +552,8 @@ void MainWindow::buildCommonWidgets() addToCentralStackedWidget(engineeringView, VIEW_ENGINEER, tr("Logfile Plot")); } +// Add the MAVLink generator UI if it's been requested. +#ifdef ENABLE_MAVGEN if (!mavlinkView) { mavlinkView = new SubMainWindow(this); @@ -554,6 +561,7 @@ void MainWindow::buildCommonWidgets() mavlinkView->setCentralWidget(new XMLCommProtocolWidget(this)); addToCentralStackedWidget(mavlinkView, VIEW_MAVLINK, tr("Mavlink Generator")); } +#endif if (!simView) { diff --git a/src/ui/MainWindow.h b/src/ui/MainWindow.h index cc98d0f1678e3493fb2a117bd0b71be18c021f53..b62eeb4c025ebd0976fe70030b0581a33c3ae6c6 100644 --- a/src/ui/MainWindow.h +++ b/src/ui/MainWindow.h @@ -56,7 +56,6 @@ This file is part of the QGROUNDCONTROL project #endif // MOUSE_ENABLED_WIN #include "DebugConsole.h" #include "ParameterInterface.h" -#include "XMLCommProtocolWidget.h" #include "HDDisplay.h" #include "WatchdogControl.h" #include "HSIDisplay.h"