Commit bf933819 authored by Don Gagne's avatar Don Gagne

Fix deadlock

parent fc77bd0f
...@@ -253,6 +253,8 @@ void ParameterLoader::_parameterUpdate(int uasId, int componentId, QString param ...@@ -253,6 +253,8 @@ void ParameterLoader::_parameterUpdate(int uasId, int componentId, QString param
connect(fact, &Fact::_containerRawValueChanged, this, &ParameterLoader::_valueUpdated); connect(fact, &Fact::_containerRawValueChanged, this, &ParameterLoader::_valueUpdated);
} }
_dataMutex.unlock();
Q_ASSERT(_mapParameterName2Variant[componentId].contains(parameterName)); Q_ASSERT(_mapParameterName2Variant[componentId].contains(parameterName));
Fact* fact = _mapParameterName2Variant[componentId][parameterName].value<Fact*>(); Fact* fact = _mapParameterName2Variant[componentId][parameterName].value<Fact*>();
...@@ -263,8 +265,6 @@ void ParameterLoader::_parameterUpdate(int uasId, int componentId, QString param ...@@ -263,8 +265,6 @@ void ParameterLoader::_parameterUpdate(int uasId, int componentId, QString param
_vehicle->firmwarePlugin()->addMetaDataToFact(fact, _vehicle->vehicleType()); _vehicle->firmwarePlugin()->addMetaDataToFact(fact, _vehicle->vehicleType());
} }
_dataMutex.unlock();
if (waitingParamCount == 0) { if (waitingParamCount == 0) {
// Now that we know vehicle is up to date persist // Now that we know vehicle is up to date persist
_saveToEEPROM(); _saveToEEPROM();
......
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