Commit c3b6c202 authored by Don Gagne's avatar Don Gagne

Fix unit test to new mock link component id

parent 1f9ea81b
......@@ -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
}
......
......@@ -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);
......
......@@ -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[componentId][paramName] = paramValue;
_mapParamName2Value[_vehicleComponentId][paramName] = paramValue;
_mapParamName2MavParamType[paramName] = static_cast<MAV_PARAM_TYPE>(paramType);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment