diff --git a/CMakeLists.txt b/CMakeLists.txt index 905f067..1102060 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,10 +117,6 @@ else() endif() endif() -add_definitions( - -DQGC_ENABLE_MAVLINK_INSPECTOR -) - #============================================================================= # Qt5 # diff --git a/QGCCommon.pri b/QGCCommon.pri index 98e8e46..8e30c72 100644 --- a/QGCCommon.pri +++ b/QGCCommon.pri @@ -28,7 +28,6 @@ linux { DEFINES += __STDC_LIMIT_MACROS DEFINES += QGC_GST_TAISYNC_ENABLED DEFINES += QGC_GST_MICROHARD_ENABLED - DEFINES += QGC_ENABLE_MAVLINK_INSPECTOR linux-clang { message("Linux clang") QMAKE_CXXFLAGS += -Qunused-arguments -fcolor-diagnostics @@ -62,11 +61,9 @@ linux { target.path = $$DESTDIR equals(ANDROID_TARGET_ARCH, armeabi-v7a) { DEFINES += __androidArm32__ - DEFINES += QGC_ENABLE_MAVLINK_INSPECTOR message("Android Arm 32 bit build") } else:equals(ANDROID_TARGET_ARCH, arm64-v8a) { DEFINES += __androidArm64__ - DEFINES += QGC_ENABLE_MAVLINK_INSPECTOR message("Android Arm 64 bit build") } else:equals(ANDROID_TARGET_ARCH, x86) { CONFIG += Androidx86Build @@ -85,7 +82,6 @@ linux { DEFINES += __STDC_LIMIT_MACROS DEFINES += QGC_GST_TAISYNC_ENABLED DEFINES += QGC_GST_MICROHARD_ENABLED - DEFINES += QGC_ENABLE_MAVLINK_INSPECTOR QMAKE_CFLAGS -= -Zc:strictStrings QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings @@ -108,7 +104,6 @@ linux { CONFIG -= x86 DEFINES += QGC_GST_TAISYNC_ENABLED DEFINES += QGC_GST_MICROHARD_ENABLED - DEFINES += QGC_ENABLE_MAVLINK_INSPECTOR equals(QT_MAJOR_VERSION, 5) | greaterThan(QT_MINOR_VERSION, 5) { QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 } else { @@ -132,7 +127,6 @@ linux { DEFINES += NO_SERIAL_LINK DEFINES += QGC_DISABLE_UVC DEFINES += QGC_GST_TAISYNC_ENABLED - DEFINES += QGC_ENABLE_MAVLINK_INSPECTOR QMAKE_IOS_DEPLOYMENT_TARGET = 11.0 QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 1,2 # Universal QMAKE_LFLAGS += -Wl,-no_pie diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index a20dce1..a975418 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -1237,7 +1237,10 @@ SOURCES += \ #------------------------------------------------------------------------------------- # MAVLink Inspector -contains (DEFINES, QGC_ENABLE_MAVLINK_INSPECTOR) { + +contains (DEFINES, QGC_DISABLE_MAVLINK_INSPECTOR) { + message("Disable mavlink inspector") +} else { HEADERS += \ src/AnalyzeView/MAVLinkInspectorController.h SOURCES += \ diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index 09ea42e..215369c 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -73,7 +73,7 @@ #include "VideoManager.h" #include "VideoReceiver.h" #include "LogDownloadController.h" -#if defined(QGC_ENABLE_MAVLINK_INSPECTOR) +#if !defined(QGC_DISABLE_MAVLINK_INSPECTOR) #include "MAVLinkInspectorController.h" #endif #include "HorizontalFactValueGrid.h" @@ -544,7 +544,7 @@ void QGCApplication::_initCommon() qmlRegisterUncreatableType (kQGroundControl, 1, 0, "LogReplayLink", kRefOnly); qmlRegisterUncreatableType (kQGroundControl, 1, 0, "InstrumentValueData", kRefOnly); qmlRegisterType (kQGroundControl, 1, 0, "LogReplayLinkController"); -#if defined(QGC_ENABLE_MAVLINK_INSPECTOR) +#if !defined(QGC_DISABLE_MAVLINK_INSPECTOR) qmlRegisterUncreatableType (kQGroundControl, 1, 0, "MAVLinkChart", kRefOnly); #endif #if defined(QGC_ENABLE_PAIRING) @@ -590,7 +590,7 @@ void QGCApplication::_initCommon() #endif qmlRegisterType (kQGCControllers, 1, 0, "GeoTagController"); qmlRegisterType (kQGCControllers, 1, 0, "MavlinkConsoleController"); -#if defined(QGC_ENABLE_MAVLINK_INSPECTOR) +#if !defined(QGC_DISABLE_MAVLINK_INSPECTOR) qmlRegisterType (kQGCControllers, 1, 0, "MAVLinkInspectorController"); #endif diff --git a/src/QmlControls/QGroundControlQmlGlobal.h b/src/QmlControls/QGroundControlQmlGlobal.h index f80e7bc..0961bab 100644 --- a/src/QmlControls/QGroundControlQmlGlobal.h +++ b/src/QmlControls/QGroundControlQmlGlobal.h @@ -201,10 +201,10 @@ public: bool hasAPMSupport () { return true; } #endif -#if defined(QGC_ENABLE_MAVLINK_INSPECTOR) - bool hasMAVLinkInspector () { return true; } -#else +#if defined(QGC_DISABLE_MAVLINK_INSPECTOR) bool hasMAVLinkInspector () { return false; } +#else + bool hasMAVLinkInspector () { return true; } #endif bool singleFirmwareSupport (); diff --git a/src/api/QGCCorePlugin.cc b/src/api/QGCCorePlugin.cc index 108a678..4bc51f7 100644 --- a/src/api/QGCCorePlugin.cc +++ b/src/api/QGCCorePlugin.cc @@ -195,7 +195,7 @@ QVariantList& QGCCorePlugin::analyzePages() _p->analyzeList.append(QVariant::fromValue(new QmlComponentInfo(tr("GeoTag Images"), QUrl::fromUserInput("qrc:/qml/GeoTagPage.qml"), QUrl::fromUserInput("qrc:/qmlimages/GeoTagIcon")))); #endif _p->analyzeList.append(QVariant::fromValue(new QmlComponentInfo(tr("MAVLink Console"), QUrl::fromUserInput("qrc:/qml/MavlinkConsolePage.qml"), QUrl::fromUserInput("qrc:/qmlimages/MavlinkConsoleIcon")))); -#if defined(QGC_ENABLE_MAVLINK_INSPECTOR) +#if !defined(QGC_DISABLE_MAVLINK_INSPECTOR) _p->analyzeList.append(QVariant::fromValue(new QmlComponentInfo(tr("MAVLink Inspector"),QUrl::fromUserInput("qrc:/qml/MAVLinkInspectorPage.qml"), QUrl::fromUserInput("qrc:/qmlimages/MAVLinkInspector")))); #endif _p->analyzeList.append(QVariant::fromValue(new QmlComponentInfo(tr("Vibration"), QUrl::fromUserInput("qrc:/qml/VibrationPage.qml"), QUrl::fromUserInput("qrc:/qmlimages/VibrationPageIcon"))));