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
7a15f9e1
Commit
7a15f9e1
authored
Dec 03, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Missed a few places where Mock Link had references on Release builds.
parent
cb41567d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
35 deletions
+51
-35
qgroundcontrol.pro
qgroundcontrol.pro
+21
-9
FactSystemTestBase.cc
src/FactSystem/FactSystemTestBase.cc
+28
-26
QGCCommConfiguration.cc
src/ui/QGCCommConfiguration.cc
+2
-0
No files found.
qgroundcontrol.pro
View file @
7a15f9e1
...
...
@@ -188,7 +188,6 @@ FORMS += \
src
/
QGCQmlWidgetHolder
.
ui
\
src
/
ui
/
MainWindow
.
ui
\
src
/
ui
/
MAVLinkSettingsWidget
.
ui
\
src
/
ui
/
MockLinkConfiguration
.
ui
\
src
/
ui
/
QGCCommConfiguration
.
ui
\
src
/
ui
/
QGCLinkConfiguration
.
ui
\
src
/
ui
/
QGCMapRCToParamDialog
.
ui
\
...
...
@@ -199,6 +198,11 @@ FORMS += \
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
ui
\
src
/
ui
/
uas
/
UASMessageView
.
ui
\
DebugBuild
{
FORMS
+=
\
src
/
ui
/
MockLinkConfiguration
.
ui
\
}
!
iOSBuild
{
FORMS
+=
\
src
/
ui
/
SerialSettings
.
ui
\
...
...
@@ -231,9 +235,6 @@ HEADERS += \
src
/
comm
/
LinkInterface
.
h
\
src
/
comm
/
LinkManager
.
h
\
src
/
comm
/
MAVLinkProtocol
.
h
\
src
/
comm
/
MockLink
.
h
\
src
/
comm
/
MockLinkFileServer
.
h
\
src
/
comm
/
MockLinkMissionItemHandler
.
h
\
src
/
comm
/
ProtocolInterface
.
h
\
src
/
comm
/
QGCMAVLink
.
h
\
src
/
comm
/
TCPLink
.
h
\
...
...
@@ -278,7 +279,6 @@ HEADERS += \
src
/
ui
/
MainWindow
.
h
\
src
/
ui
/
MAVLinkDecoder
.
h
\
src
/
ui
/
MAVLinkSettingsWidget
.
h
\
src
/
ui
/
MockLinkConfiguration
.
h
\
src
/
ui
/
QGCCommConfiguration
.
h
\
src
/
ui
/
QGCLinkConfiguration
.
h
\
src
/
ui
/
QGCMapRCToParamDialog
.
h
\
...
...
@@ -292,6 +292,14 @@ HEADERS += \
src
/
AutoPilotPlugins
/
PX4
/
PX4AirframeLoader
.
h
\
src
/
QmlControls
/
QGCImageProvider
.
h
\
DebugBuild
{
HEADERS
+=
\
src
/
comm
/
MockLink
.
h
\
src
/
comm
/
MockLinkFileServer
.
h
\
src
/
comm
/
MockLinkMissionItemHandler
.
h
\
src
/
ui
/
MockLinkConfiguration
.
h
\
}
WindowsBuild
{
PRECOMPILED_HEADER
+=
src
/
stable_headers
.
h
HEADERS
+=
src
/
stable_headers
.
h
...
...
@@ -349,9 +357,6 @@ SOURCES += \
src
/
comm
/
LinkConfiguration
.
cc
\
src
/
comm
/
LinkManager
.
cc
\
src
/
comm
/
MAVLinkProtocol
.
cc
\
src
/
comm
/
MockLink
.
cc
\
src
/
comm
/
MockLinkFileServer
.
cc
\
src
/
comm
/
MockLinkMissionItemHandler
.
cc
\
src
/
comm
/
TCPLink
.
cc
\
src
/
comm
/
UDPLink
.
cc
\
src
/
FlightDisplay
/
FlightDisplayViewController
.
cc
\
...
...
@@ -390,7 +395,6 @@ SOURCES += \
src
/
ui
/
MainWindow
.
cc
\
src
/
ui
/
MAVLinkDecoder
.
cc
\
src
/
ui
/
MAVLinkSettingsWidget
.
cc
\
src
/
ui
/
MockLinkConfiguration
.
cc
\
src
/
ui
/
QGCCommConfiguration
.
cc
\
src
/
ui
/
QGCLinkConfiguration
.
cc
\
src
/
ui
/
QGCMapRCToParamDialog
.
cpp
\
...
...
@@ -404,6 +408,14 @@ SOURCES += \
src
/
AutoPilotPlugins
/
PX4
/
PX4AirframeLoader
.
cc
\
src
/
QmlControls
/
QGCImageProvider
.
cc
\
DebugBuild
{
SOURCES
+=
\
src
/
comm
/
MockLink
.
cc
\
src
/
comm
/
MockLinkFileServer
.
cc
\
src
/
comm
/
MockLinkMissionItemHandler
.
cc
\
src
/
ui
/
MockLinkConfiguration
.
cc
\
}
!
iOSBuild
{
SOURCES
+=
\
src
/
comm
/
QGCSerialPortInfo
.
cc
\
...
...
src/FactSystem/FactSystemTestBase.cc
View file @
7a15f9e1
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/// @file
...
...
@@ -26,7 +26,9 @@
#include "FactSystemTestBase.h"
#include "LinkManager.h"
#ifdef QT_DEBUG
#include "MockLink.h"
#endif
#include "MultiVehicleManager.h"
#include "QGCApplication.h"
#include "QGCMessageBox.h"
...
...
@@ -37,15 +39,15 @@
/// FactSystem Unit Test
FactSystemTestBase
::
FactSystemTestBase
(
void
)
{
}
void
FactSystemTestBase
::
_init
(
MAV_AUTOPILOT
autopilot
)
{
UnitTest
::
init
();
_connectMockLink
(
autopilot
);
_plugin
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
activeVehicle
()
->
autopilotPlugin
();
Q_ASSERT
(
_plugin
);
}
...
...
@@ -63,7 +65,7 @@ void FactSystemTestBase::_parameter_default_component_id_test(void)
QVERIFY
(
fact
!=
NULL
);
QVariant
factValue
=
fact
->
rawValue
();
QCOMPARE
(
factValue
.
isValid
(),
true
);
QCOMPARE
(
factValue
.
toInt
(),
3
);
}
...
...
@@ -74,17 +76,17 @@ void FactSystemTestBase::_parameter_specific_component_id_test(void)
QVERIFY
(
fact
!=
NULL
);
QVariant
factValue
=
fact
->
rawValue
();
QCOMPARE
(
factValue
.
isValid
(),
true
);
QCOMPARE
(
factValue
.
toInt
(),
3
);
// Test another component id
QVERIFY
(
_plugin
->
factExists
(
FactSystem
::
ParameterProvider
,
51
,
"COMPONENT_51"
));
fact
=
_plugin
->
getFact
(
FactSystem
::
ParameterProvider
,
51
,
"COMPONENT_51"
);
QVERIFY
(
fact
!=
NULL
);
factValue
=
fact
->
rawValue
();
QCOMPARE
(
factValue
.
isValid
(),
true
);
QCOMPARE
(
factValue
.
toInt
(),
51
);
}
...
...
@@ -92,18 +94,18 @@ void FactSystemTestBase::_parameter_specific_component_id_test(void)
void
FactSystemTestBase
::
_qml_test
(
void
)
{
QGCQuickWidget
*
widget
=
new
QGCQuickWidget
;
widget
->
setAutoPilot
(
_plugin
);
widget
->
setSource
(
QUrl
::
fromUserInput
(
"qrc:unittest/FactSystemTest.qml"
));
QQuickItem
*
rootObject
=
widget
->
rootObject
();
QObject
*
control
=
rootObject
->
findChild
<
QObject
*>
(
"testControl"
);
QVERIFY
(
control
!=
NULL
);
QVariant
qmlValue
=
control
->
property
(
"text"
).
toInt
();
QCOMPARE
(
qmlValue
.
toInt
(),
3
);
delete
widget
;
}
...
...
@@ -111,25 +113,25 @@ void FactSystemTestBase::_qml_test(void)
void
FactSystemTestBase
::
_qmlUpdate_test
(
void
)
{
QGCQuickWidget
*
widget
=
new
QGCQuickWidget
;
widget
->
setAutoPilot
(
_plugin
);
widget
->
setSource
(
QUrl
::
fromUserInput
(
"qrc:unittest/FactSystemTest.qml"
));
// Change the value
QVariant
paramValue
=
12
;
_plugin
->
getParameterFact
(
FactSystem
::
defaultComponentId
,
"RC_MAP_THROTTLE"
)
->
setRawValue
(
paramValue
);
QTest
::
qWait
(
500
);
// Let the signals flow through
// Make sure the qml has the right value
QQuickItem
*
rootObject
=
widget
->
rootObject
();
QObject
*
control
=
rootObject
->
findChild
<
QObject
*>
(
"testControl"
);
QVERIFY
(
control
!=
NULL
);
QCOMPARE
(
control
->
property
(
"text"
).
toInt
(),
12
);
delete
widget
;
}
src/ui/QGCCommConfiguration.cc
View file @
7a15f9e1
...
...
@@ -36,7 +36,9 @@ This file is part of the QGROUNDCONTROL project
#endif
#include "QGCUDPLinkConfiguration.h"
#include "QGCTCPLinkConfiguration.h"
#ifdef QT_DEBUG
#include "MockLinkConfiguration.h"
#endif
#ifndef __mobile__
#include "LogReplayLinkConfigurationWidget.h"
#endif
...
...
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