|
|
|
@ -43,6 +43,7 @@ static const char* kReadOnly = "readonly";
@@ -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"; |
|
|
|
@ -800,6 +801,22 @@ QGCCameraControl::_loadSettings(const QDomNodeList nodeList)
@@ -800,6 +801,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; |
|
|
|
|
if(read_attribute(parameterNode, kUnit, attr)) { |
|
|
|
|