Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
bbf7f098
Unverified
Commit
bbf7f098
authored
Oct 26, 2018
by
Gus Grubba
Committed by
GitHub
Oct 26, 2018
Browse files
Merge pull request #6955 from mavlink/decimalPlaces
CP - Add support for decimal places
parents
c0ce9133
0f3caccc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Camera/QGCCameraControl.cc
View file @
bbf7f098
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment