diff --git a/src/AutoPilotPlugins/AutoPilotPluginManager.cc b/src/AutoPilotPlugins/AutoPilotPluginManager.cc index 8017253..e164470 100644 --- a/src/AutoPilotPlugins/AutoPilotPluginManager.cc +++ b/src/AutoPilotPlugins/AutoPilotPluginManager.cc @@ -28,6 +28,7 @@ #include "PX4/PX4AutoPilotPlugin.h" #include "Generic/GenericAutoPilotPlugin.h" #include "QGCApplication.h" +#include "QGCMessageBox.h" #include "UASManager.h" IMPLEMENT_QGC_SINGLETON(AutoPilotPluginManager, AutoPilotPluginManager) @@ -81,6 +82,9 @@ void AutoPilotPluginManager::_uasCreated(UASInterface* uas) plugin = new GenericAutoPilotPlugin(uas, this); Q_CHECK_PTR(plugin); _pluginMap[MAV_AUTOPILOT_GENERIC][uasId] = QSharedPointer(plugin); + QGCMessageBox::warning("Partial Support AutoPilot", + "Warning: You have connected QGroundControl to a firmware flight stack which is only partially supported. " + "If you are using the APM Flight Stack it is currently recommended to use Mission Planner, APM Planner or Tower as your ground control station."); } } diff --git a/src/FactSystem/FactSystemTestBase.cc b/src/FactSystem/FactSystemTestBase.cc index cd6a643..5650f70 100644 --- a/src/FactSystem/FactSystemTestBase.cc +++ b/src/FactSystem/FactSystemTestBase.cc @@ -30,6 +30,7 @@ #include "AutoPilotPluginManager.h" #include "UASManager.h" #include "QGCApplication.h" +#include "QGCMessageBox.h" #include "QGCQuickWidget.h" #include @@ -49,6 +50,11 @@ void FactSystemTestBase::_init(MAV_AUTOPILOT autopilot) MockLink* link = new MockLink(); link->setAutopilotType(autopilot); _linkMgr->_addLink(link); + + if (autopilot == MAV_AUTOPILOT_ARDUPILOTMEGA) { + // Connect will pop a warning dialog + setExpectedMessageBox(QGCMessageBox::Ok); + } _linkMgr->connectLink(link); // Wait for the uas to work it's way through the various threads @@ -56,6 +62,10 @@ void FactSystemTestBase::_init(MAV_AUTOPILOT autopilot) QSignalSpy spyUas(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*))); QCOMPARE(spyUas.wait(5000), true); + if (autopilot == MAV_AUTOPILOT_ARDUPILOTMEGA) { + checkExpectedMessageBox(); + } + _uas = UASManager::instance()->getActiveUAS(); Q_ASSERT(_uas); diff --git a/src/qgcunittest/MainWindowTest.cc b/src/qgcunittest/MainWindowTest.cc index 12cabaa..363bc2e 100644 --- a/src/qgcunittest/MainWindowTest.cc +++ b/src/qgcunittest/MainWindowTest.cc @@ -67,6 +67,11 @@ void MainWindowTest::_connectWindowClose_test(MAV_AUTOPILOT autopilot) Q_CHECK_PTR(link); link->setAutopilotType(autopilot); LinkManager::instance()->_addLink(link); + + if (autopilot == MAV_AUTOPILOT_ARDUPILOTMEGA) { + // Connect will pop a warning dialog + setExpectedMessageBox(QGCMessageBox::Ok); + } linkMgr->connectLink(link); // Wait for the uas to work it's way through the various threads @@ -74,6 +79,10 @@ void MainWindowTest::_connectWindowClose_test(MAV_AUTOPILOT autopilot) QSignalSpy spyUas(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*))); QCOMPARE(spyUas.wait(5000), true); + if (autopilot == MAV_AUTOPILOT_ARDUPILOTMEGA) { + checkExpectedMessageBox(); + } + // Cycle through all the top level views _mainToolBar->onSetupView();