diff --git a/QGCExternalLibs.pri b/QGCExternalLibs.pri index f84270118e252f6b2778a723e159e4bb67a5f070..619054220599dc223b2c73ec009c1ffc6f6e85b5 100644 --- a/QGCExternalLibs.pri +++ b/QGCExternalLibs.pri @@ -454,41 +454,46 @@ contains(DEFINES, DISABLE_3DMOUSE) { } # -# Opal RT-LAB Library +# [OPTIONAL] Opal RT-LAB Library. Provides integration with Opal-RT's RT-LAB simulator. # +contains(DEFINES, DISABLE_RTLAB) { + message("Skipping support for RT-LAB (manual override)") +} else:WindowsBuild { + exists(src/lib/opalrt/OpalApi.h) : exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) { + message("Including support for Opal-RT") -WindowsBuild : win32 : exists(src/lib/opalrt/OpalApi.h) : exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) { - message("Including support for Opal-RT") - - DEFINES += OPAL_RT + DEFINES += OPAL_RT - INCLUDEPATH += - src/lib/opalrt - libs/lib/opal/include \ + INCLUDEPATH += + src/lib/opalrt + libs/lib/opal/include \ - FORMS += src/ui/OpalLinkSettings.ui + FORMS += src/ui/OpalLinkSettings.ui - HEADERS += \ - src/comm/OpalRT.h \ - src/comm/OpalLink.h \ - src/comm/Parameter.h \ - src/comm/QGCParamID.h \ - src/comm/ParameterList.h \ - src/ui/OpalLinkConfigurationWindow.h + HEADERS += \ + src/comm/OpalRT.h \ + src/comm/OpalLink.h \ + src/comm/Parameter.h \ + src/comm/QGCParamID.h \ + src/comm/ParameterList.h \ + src/ui/OpalLinkConfigurationWindow.h - SOURCES += \ - src/comm/OpalRT.cc \ - src/comm/OpalLink.cc \ - src/comm/Parameter.cc \ - src/comm/QGCParamID.cc \ - src/comm/ParameterList.cc \ - src/ui/OpalLinkConfigurationWindow.cc + SOURCES += \ + src/comm/OpalRT.cc \ + src/comm/OpalLink.cc \ + src/comm/Parameter.cc \ + src/comm/QGCParamID.cc \ + src/comm/ParameterList.cc \ + src/ui/OpalLinkConfigurationWindow.cc - LIBS += \ - -LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \ - -lOpalApi + LIBS += \ + -LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \ + -lOpalApi + } else { + warning("Skipping support for RT-LAB (missing libraries, see README)") + } } else { - message("Skipping support for Opal-RT") + message("Skipping support for RT-LAB (unsupported platform)") } # diff --git a/README.md b/README.md index f59a66854c047efba4d76ba8ee0991ab0ab40b65..e3acb9e3784387958f0a5bdb439fc8d71c35fc46 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,11 @@ An add-on is available for QGC that provides a UI for generating MAVLink dialect 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`. +### Opal-RT's RT-LAB simulator +Integration with Opal-RT's RT-LAB simulator can be enabled on Windows by installing RT-LAB 7.2.4. Thallows vehicles to be simulated in RT-LAB and communicate directly with QGC on the same computer as if the UAS was actually deployed. + +This support is enabled by default once the requisite RT-LAB software is installed. Disabling this can be done by defining DISABLE_RTLAB when running qmake. + ### 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"`.