Commit 6273c31c authored by Don Gagne's avatar Don Gagne

Allow dups in param meta data

The ardupilot parameter meta data generator will generate dups when the
parameter is in ifdef'ed code
parent 5670190e
...@@ -238,22 +238,19 @@ void APMParameterMetaData::loadParameterFactMetaDataFile(const QString& metaData ...@@ -238,22 +238,19 @@ void APMParameterMetaData::loadParameterFactMetaDataFile(const QString& metaData
<< "group: " << group; << "group: " << group;
Q_ASSERT(!rawMetaData); Q_ASSERT(!rawMetaData);
rawMetaData = new APMFactMetaDataRaw();
if (_vehicleTypeToParametersMap[currentCategory].contains(name)) { if (_vehicleTypeToParametersMap[currentCategory].contains(name)) {
// We can't trust the meta dafa since we have dups qCDebug(APMParameterMetaDataLog) << "Duplicate parameter found:" << name;
qCWarning(APMParameterMetaDataLog) << "Duplicate parameter found:" << name; rawMetaData = _vehicleTypeToParametersMap[currentCategory][name];
badMetaData = true;
} else { } else {
qCDebug(APMParameterMetaDataVerboseLog) << "inserting metadata for field" << name; rawMetaData = new APMFactMetaDataRaw();
_vehicleTypeToParametersMap[currentCategory][name] = rawMetaData; _vehicleTypeToParametersMap[currentCategory][name] = rawMetaData;
rawMetaData->name = name;
rawMetaData->group = group;
rawMetaData->shortDescription = shortDescription;
rawMetaData->longDescription = longDescription;
groupMembers[group] << name; groupMembers[group] << name;
} }
qCDebug(APMParameterMetaDataVerboseLog) << "inserting metadata for field" << name;
rawMetaData->name = name;
rawMetaData->group = group;
rawMetaData->shortDescription = shortDescription;
rawMetaData->longDescription = longDescription;
} else { } else {
// We should be getting meta data now // We should be getting meta data now
if (xmlState.top() != XmlStateFoundParameter) { if (xmlState.top() != XmlStateFoundParameter) {
......
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