Commit 6692ce34 authored by Don Gagne's avatar Don Gagne

Support boolean as enum

parent a58e3995
......@@ -317,6 +317,14 @@ void PX4ParameterMetaData::loadParameterFactMetaDataFile(const QString& metaData
} else {
qCWarning(PX4ParameterMetaDataLog) << "Invalid value for increment, name:" << metaData->name() << " increment:" << text;
}
} else if (elementName == "boolean") {
QVariant enumValue;
metaData->convertAndValidateRaw(1, false /* validate */, enumValue, errorString);
metaData->addEnumInfo(tr("Enabled"), enumValue);
metaData->convertAndValidateRaw(0, false /* validate */, enumValue, errorString);
metaData->addEnumInfo(tr("Disabled"), enumValue);
} else {
qCDebug(PX4ParameterMetaDataLog) << "Unknown element in XML: " << elementName;
}
......
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