Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
210f0038
Commit
210f0038
authored
Jul 21, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1727 from DonLakeFlyer/APMWarning
Warn if using generic flight stack
parents
29365f96
95c58087
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
AutoPilotPluginManager.cc
src/AutoPilotPlugins/AutoPilotPluginManager.cc
+4
-0
FactSystemTestBase.cc
src/FactSystem/FactSystemTestBase.cc
+10
-0
MainWindowTest.cc
src/qgcunittest/MainWindowTest.cc
+9
-0
No files found.
src/AutoPilotPlugins/AutoPilotPluginManager.cc
View file @
210f0038
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include "PX4/PX4AutoPilotPlugin.h"
#include "PX4/PX4AutoPilotPlugin.h"
#include "Generic/GenericAutoPilotPlugin.h"
#include "Generic/GenericAutoPilotPlugin.h"
#include "QGCApplication.h"
#include "QGCApplication.h"
#include "QGCMessageBox.h"
#include "UASManager.h"
#include "UASManager.h"
IMPLEMENT_QGC_SINGLETON
(
AutoPilotPluginManager
,
AutoPilotPluginManager
)
IMPLEMENT_QGC_SINGLETON
(
AutoPilotPluginManager
,
AutoPilotPluginManager
)
...
@@ -81,6 +82,9 @@ void AutoPilotPluginManager::_uasCreated(UASInterface* uas)
...
@@ -81,6 +82,9 @@ void AutoPilotPluginManager::_uasCreated(UASInterface* uas)
plugin
=
new
GenericAutoPilotPlugin
(
uas
,
this
);
plugin
=
new
GenericAutoPilotPlugin
(
uas
,
this
);
Q_CHECK_PTR
(
plugin
);
Q_CHECK_PTR
(
plugin
);
_pluginMap
[
MAV_AUTOPILOT_GENERIC
][
uasId
]
=
QSharedPointer
<
AutoPilotPlugin
>
(
plugin
);
_pluginMap
[
MAV_AUTOPILOT_GENERIC
][
uasId
]
=
QSharedPointer
<
AutoPilotPlugin
>
(
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."
);
}
}
}
}
...
...
src/FactSystem/FactSystemTestBase.cc
View file @
210f0038
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "AutoPilotPluginManager.h"
#include "AutoPilotPluginManager.h"
#include "UASManager.h"
#include "UASManager.h"
#include "QGCApplication.h"
#include "QGCApplication.h"
#include "QGCMessageBox.h"
#include "QGCQuickWidget.h"
#include "QGCQuickWidget.h"
#include <QQuickItem>
#include <QQuickItem>
...
@@ -49,6 +50,11 @@ void FactSystemTestBase::_init(MAV_AUTOPILOT autopilot)
...
@@ -49,6 +50,11 @@ void FactSystemTestBase::_init(MAV_AUTOPILOT autopilot)
MockLink
*
link
=
new
MockLink
();
MockLink
*
link
=
new
MockLink
();
link
->
setAutopilotType
(
autopilot
);
link
->
setAutopilotType
(
autopilot
);
_linkMgr
->
_addLink
(
link
);
_linkMgr
->
_addLink
(
link
);
if
(
autopilot
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
// Connect will pop a warning dialog
setExpectedMessageBox
(
QGCMessageBox
::
Ok
);
}
_linkMgr
->
connectLink
(
link
);
_linkMgr
->
connectLink
(
link
);
// Wait for the uas to work it's way through the various threads
// Wait for the uas to work it's way through the various threads
...
@@ -56,6 +62,10 @@ void FactSystemTestBase::_init(MAV_AUTOPILOT autopilot)
...
@@ -56,6 +62,10 @@ void FactSystemTestBase::_init(MAV_AUTOPILOT autopilot)
QSignalSpy
spyUas
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)));
QSignalSpy
spyUas
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)));
QCOMPARE
(
spyUas
.
wait
(
5000
),
true
);
QCOMPARE
(
spyUas
.
wait
(
5000
),
true
);
if
(
autopilot
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
checkExpectedMessageBox
();
}
_uas
=
UASManager
::
instance
()
->
getActiveUAS
();
_uas
=
UASManager
::
instance
()
->
getActiveUAS
();
Q_ASSERT
(
_uas
);
Q_ASSERT
(
_uas
);
...
...
src/qgcunittest/MainWindowTest.cc
View file @
210f0038
...
@@ -67,6 +67,11 @@ void MainWindowTest::_connectWindowClose_test(MAV_AUTOPILOT autopilot)
...
@@ -67,6 +67,11 @@ void MainWindowTest::_connectWindowClose_test(MAV_AUTOPILOT autopilot)
Q_CHECK_PTR
(
link
);
Q_CHECK_PTR
(
link
);
link
->
setAutopilotType
(
autopilot
);
link
->
setAutopilotType
(
autopilot
);
LinkManager
::
instance
()
->
_addLink
(
link
);
LinkManager
::
instance
()
->
_addLink
(
link
);
if
(
autopilot
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
// Connect will pop a warning dialog
setExpectedMessageBox
(
QGCMessageBox
::
Ok
);
}
linkMgr
->
connectLink
(
link
);
linkMgr
->
connectLink
(
link
);
// Wait for the uas to work it's way through the various threads
// Wait for the uas to work it's way through the various threads
...
@@ -74,6 +79,10 @@ void MainWindowTest::_connectWindowClose_test(MAV_AUTOPILOT autopilot)
...
@@ -74,6 +79,10 @@ void MainWindowTest::_connectWindowClose_test(MAV_AUTOPILOT autopilot)
QSignalSpy
spyUas
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)));
QSignalSpy
spyUas
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)));
QCOMPARE
(
spyUas
.
wait
(
5000
),
true
);
QCOMPARE
(
spyUas
.
wait
(
5000
),
true
);
if
(
autopilot
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
checkExpectedMessageBox
();
}
// Cycle through all the top level views
// Cycle through all the top level views
_mainToolBar
->
onSetupView
();
_mainToolBar
->
onSetupView
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment