From bf93381950cc60a7eab75e9d7b787eeda59e1693 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 15 Dec 2015 10:37:54 -0800 Subject: [PATCH] Fix deadlock --- src/FactSystem/ParameterLoader.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FactSystem/ParameterLoader.cc b/src/FactSystem/ParameterLoader.cc index 91d072602..df9dcb36d 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(); -- 2.22.0