diff --git a/src/FactSystem/ParameterLoader.cc b/src/FactSystem/ParameterLoader.cc index 91d072602dcc2cd2fc55227556a7dfebfaaf9551..df9dcb36ddc8aa709a2a0faab2d0f149eeab6b17 100644 --- a/src/FactSystem/ParameterLoader.cc +++ b/src/FactSystem/ParameterLoader.cc @@ -253,6 +253,8 @@ void ParameterLoader::_parameterUpdate(int uasId, int componentId, QString param connect(fact, &Fact::_containerRawValueChanged, this, &ParameterLoader::_valueUpdated); } + _dataMutex.unlock(); + Q_ASSERT(_mapParameterName2Variant[componentId].contains(parameterName)); Fact* fact = _mapParameterName2Variant[componentId][parameterName].value(); @@ -263,8 +265,6 @@ void ParameterLoader::_parameterUpdate(int uasId, int componentId, QString param _vehicle->firmwarePlugin()->addMetaDataToFact(fact, _vehicle->vehicleType()); } - _dataMutex.unlock(); - if (waitingParamCount == 0) { // Now that we know vehicle is up to date persist _saveToEEPROM();