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
4dd68530
Commit
4dd68530
authored
Sep 13, 2017
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding support for booleans
Adding some more logging
parent
eac9d306
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
QGCCameraControl.cc
src/Camera/QGCCameraControl.cc
+1
-0
QGCCameraIO.cc
src/Camera/QGCCameraIO.cc
+4
-2
No files found.
src/Camera/QGCCameraControl.cc
View file @
4dd68530
...
...
@@ -671,6 +671,7 @@ QGCCameraControl::_loadSettings(const QDomNodeList nodeList)
qWarning
()
<<
QStringLiteral
(
"Duplicate fact name:"
)
<<
factName
;
delete
metaData
;
}
else
{
qCDebug
(
CameraControlLog
)
<<
"New parameter:"
<<
factName
;
_nameToFactMetaDataMap
[
factName
]
=
metaData
;
Fact
*
pFact
=
new
Fact
(
_compID
,
factName
,
factType
,
this
);
QQmlEngine
::
setObjectOwnership
(
pFact
,
QQmlEngine
::
CppOwnership
);
...
...
src/Camera/QGCCameraIO.cc
View file @
4dd68530
...
...
@@ -37,6 +37,7 @@ QGCCameraParamIO::QGCCameraParamIO(QGCCameraControl *control, Fact* fact, Vehicl
// probably be updated.
switch
(
_fact
->
type
())
{
case
FactMetaData
:
:
valueTypeUint8
:
case
FactMetaData
:
:
valueTypeBool
:
_mavParamType
=
MAV_PARAM_TYPE_UINT8
;
break
;
case
FactMetaData
:
:
valueTypeInt8
:
...
...
@@ -55,7 +56,7 @@ QGCCameraParamIO::QGCCameraParamIO(QGCCameraControl *control, Fact* fact, Vehicl
_mavParamType
=
MAV_PARAM_TYPE_REAL32
;
break
;
default:
qWarning
()
<<
"Unsupported fact type"
<<
_fact
->
type
();
qWarning
()
<<
"Unsupported fact type"
<<
_fact
->
type
()
<<
"for"
<<
_fact
->
name
()
;
// Fall through
case
FactMetaData
:
:
valueTypeInt32
:
_mavParamType
=
MAV_PARAM_TYPE_INT32
;
...
...
@@ -119,6 +120,7 @@ QGCCameraParamIO::_sendParameter()
p
.
param_type
=
_mavParamType
;
switch
(
factType
)
{
case
FactMetaData
:
:
valueTypeUint8
:
case
FactMetaData
:
:
valueTypeBool
:
union_value
.
param_uint8
=
(
uint8_t
)
_fact
->
rawValue
().
toUInt
();
break
;
case
FactMetaData
:
:
valueTypeInt8
:
...
...
@@ -137,7 +139,7 @@ QGCCameraParamIO::_sendParameter()
union_value
.
param_float
=
_fact
->
rawValue
().
toFloat
();
break
;
default:
qCritical
()
<<
"Unsupported fact type"
<<
factType
;
qCritical
()
<<
"Unsupported fact type"
<<
factType
<<
"for"
<<
_fact
->
name
()
;
// fall through
case
FactMetaData
:
:
valueTypeInt32
:
union_value
.
param_int32
=
(
int32_t
)
_fact
->
rawValue
().
toInt
();
...
...
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