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
c3b6c202
Commit
c3b6c202
authored
Feb 15, 2017
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unit test to new mock link component id
parent
1f9ea81b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
FactSystemTest.qml
src/FactSystem/FactSystemTest.qml
+1
-1
FactSystemTestBase.cc
src/FactSystem/FactSystemTestBase.cc
+2
-2
MockLink.cc
src/comm/MockLink.cc
+1
-2
No files found.
src/FactSystem/FactSystemTest.qml
View file @
c3b6c202
...
...
@@ -32,7 +32,7 @@ FactPanel {
TextInput
{
text
:
fact2
.
value
property
Fact
fact2
:
controller
.
getParameterFact
(
1
,
"
RC_MAP_THROTTLE
"
)
property
Fact
fact2
:
controller
.
getParameterFact
(
200
,
"
RC_MAP_THROTTLE
"
)
onAccepted
:
fact2
.
value
=
text
}
...
...
src/FactSystem/FactSystemTestBase.cc
View file @
c3b6c202
...
...
@@ -58,8 +58,8 @@ void FactSystemTestBase::_parameter_default_component_id_test(void)
void
FactSystemTestBase
::
_parameter_specific_component_id_test
(
void
)
{
QVERIFY
(
_vehicle
->
parameterManager
()
->
parameterExists
(
1
,
"RC_MAP_THROTTLE"
));
Fact
*
fact
=
_vehicle
->
parameterManager
()
->
getParameter
(
1
,
"RC_MAP_THROTTLE"
);
QVERIFY
(
_vehicle
->
parameterManager
()
->
parameterExists
(
200
,
"RC_MAP_THROTTLE"
));
Fact
*
fact
=
_vehicle
->
parameterManager
()
->
getParameter
(
200
,
"RC_MAP_THROTTLE"
);
QVERIFY
(
fact
!=
NULL
);
QVariant
factValue
=
fact
->
rawValue
();
QCOMPARE
(
factValue
.
isValid
(),
true
);
...
...
src/comm/MockLink.cc
View file @
c3b6c202
...
...
@@ -215,7 +215,6 @@ void MockLink::_loadParams(void)
QStringList
paramData
=
line
.
split
(
"
\t
"
);
Q_ASSERT
(
paramData
.
count
()
==
5
);
int
componentId
=
paramData
.
at
(
1
).
toInt
();
QString
paramName
=
paramData
.
at
(
2
);
QString
valStr
=
paramData
.
at
(
3
);
uint
paramType
=
paramData
.
at
(
4
).
toUInt
();
...
...
@@ -251,7 +250,7 @@ void MockLink::_loadParams(void)
qCDebug
(
MockLinkVerboseLog
)
<<
"Loading param"
<<
paramName
<<
paramValue
;
_mapParamName2Value
[
c
omponentId
][
paramName
]
=
paramValue
;
_mapParamName2Value
[
_vehicleC
omponentId
][
paramName
]
=
paramValue
;
_mapParamName2MavParamType
[
paramName
]
=
static_cast
<
MAV_PARAM_TYPE
>
(
paramType
);
}
}
...
...
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