diff --git a/src/ui/px4_configuration/PX4RCCalibration.cc b/src/ui/px4_configuration/PX4RCCalibration.cc index e4fa21640cb34ef15826f7cc3244bc96809b7943..efdab85ed97e25ecddf049f6320d1352fcbaab46 100644 --- a/src/ui/px4_configuration/PX4RCCalibration.cc +++ b/src/ui/px4_configuration/PX4RCCalibration.cc @@ -163,32 +163,33 @@ void PX4RCCalibration::_setInternalCalibrationValuesFromParameters(void) QVariant value; bool paramFound; bool convertOk; + int componentId = _paramMgr->getDefaultComponentId(); for (int i = 0; i < _chanMax; ++i) { struct ChannelInfo* info = &_rgChannelInfo[i]; - paramFound = _paramMgr->getParameterValue(50, trimTpl.arg(i+1), value); + paramFound = _paramMgr->getParameterValue(componentId, trimTpl.arg(i+1), value); Q_ASSERT(paramFound); if (paramFound) { info->rcTrim = value.toInt(&convertOk); Q_ASSERT(convertOk); } - paramFound = _paramMgr->getParameterValue(50, minTpl.arg(i+1), value); + paramFound = _paramMgr->getParameterValue(componentId, minTpl.arg(i+1), value); Q_ASSERT(paramFound); if (paramFound) { info->rcMin = value.toInt(&convertOk); Q_ASSERT(convertOk); } - paramFound = _paramMgr->getParameterValue(50, maxTpl.arg(i+1), value); + paramFound = _paramMgr->getParameterValue(componentId, maxTpl.arg(i+1), value); Q_ASSERT(paramFound); if (paramFound) { info->rcMax = value.toInt(&convertOk); Q_ASSERT(convertOk); } - paramFound = _paramMgr->getParameterValue(50, revTpl.arg(i+1), value); + paramFound = _paramMgr->getParameterValue(componentId, revTpl.arg(i+1), value); Q_ASSERT(paramFound); if (paramFound) { float floatReversed = value.toFloat(&convertOk); @@ -201,7 +202,7 @@ void PX4RCCalibration::_setInternalCalibrationValuesFromParameters(void) for (int i=0; igetParameterValue(50, _rgFunctionInfo[i].parameterName, value); + paramFound = _paramMgr->getParameterValue(componentId, _rgFunctionInfo[i].parameterName, value); Q_ASSERT(paramFound); if (paramFound) { paramChannel = value.toInt(&convertOk);