Commit 0f3caccc authored by Gus Grubba's avatar Gus Grubba Committed by Gus Grubba

CP - Add support for decimal places

parent c0ce9133
......@@ -43,6 +43,7 @@ static const char* kReadOnly = "readonly";
static const char* kWriteOnly = "writeonly";
static const char* kRoption = "roption";
static const char* kStep = "step";
static const char* kDecimalPlaces = "decimalPlaces";
static const char* kStrings = "strings";
static const char* kTranslated = "translated";
static const char* kType = "type";
......@@ -799,6 +800,22 @@ QGCCameraControl::_loadSettings(const QDomNodeList nodeList)
}
}
}
{
//-- Check for Decimal Places
QString attr;
if(read_attribute(parameterNode, kDecimalPlaces, attr)) {
QVariant typedValue;
QString errorString;
if (metaData->convertAndValidateRaw(attr, true /* convertOnly */, typedValue, errorString)) {
metaData->setDecimalPlaces(typedValue.toInt());
} else {
qWarning() << "Invalid decimal places value for" << factName
<< " type:" << metaData->type()
<< " value:" << attr
<< " error:" << errorString;
}
}
}
{
//-- Check for Units
QString attr;
......
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