Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
c3b6c202
Commit
c3b6c202
authored
Feb 15, 2017
by
Don Gagne
Browse files
Fix unit test to new mock link component id
parent
1f9ea81b
Changes
3
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
0%
Try again
or
attach a new 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