Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
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
Options
Browse Files
Download
Plain Diff
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
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
QGCCameraControl.cc
src/Camera/QGCCameraControl.cc
+17
-0
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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