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
c0aec101
Commit
c0aec101
authored
Apr 23, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed logging naming convention for camera control
parent
df2aa913
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
QGCCameraControl.cc
src/Camera/QGCCameraControl.cc
+12
-12
QGCCameraControl.h
src/Camera/QGCCameraControl.h
+1
-1
No files found.
src/Camera/QGCCameraControl.cc
View file @
c0aec101
...
...
@@ -18,7 +18,7 @@
#include <QDomNodeList>
QGC_LOGGING_CATEGORY
(
CameraControlLog
,
"CameraControlLog"
)
QGC_LOGGING_CATEGORY
(
CameraControl
LogVerbose
,
"CameraControlLogVerbose
"
)
QGC_LOGGING_CATEGORY
(
CameraControl
VerboseLog
,
"CameraControlVerboseLog
"
)
static
const
char
*
kCondition
=
"condition"
;
static
const
char
*
kControl
=
"control"
;
...
...
@@ -873,7 +873,7 @@ QGCCameraControl::_loadSettings(const QDomNodeList nodeList)
//-- Check for updates
QStringList
updates
=
_loadUpdates
(
parameterNode
);
if
(
updates
.
size
())
{
qCDebug
(
CameraControl
LogVerbose
)
<<
"Parameter"
<<
factName
<<
"requires updates for:"
<<
updates
;
qCDebug
(
CameraControl
VerboseLog
)
<<
"Parameter"
<<
factName
<<
"requires updates for:"
<<
updates
;
_requestUpdates
[
factName
]
=
updates
;
}
//-- Build metadata
...
...
@@ -907,7 +907,7 @@ QGCCameraControl::_loadSettings(const QDomNodeList nodeList)
//-- Check for exclusions
QStringList
exclusions
=
_loadExclusions
(
option
);
if
(
exclusions
.
size
())
{
qCDebug
(
CameraControl
LogVerbose
)
<<
"New exclusions:"
<<
factName
<<
optValue
<<
exclusions
;
qCDebug
(
CameraControl
VerboseLog
)
<<
"New exclusions:"
<<
factName
<<
optValue
<<
exclusions
;
QGCCameraOptionExclusion
*
pExc
=
new
QGCCameraOptionExclusion
(
this
,
factName
,
optValue
,
exclusions
);
QQmlEngine
::
setObjectOwnership
(
pExc
,
QQmlEngine
::
CppOwnership
);
_valueExclusions
.
append
(
pExc
);
...
...
@@ -1136,7 +1136,7 @@ QGCCameraControl::_requestAllParameters()
static_cast
<
uint8_t
>
(
_vehicle
->
id
()),
static_cast
<
uint8_t
>
(
compID
()));
_vehicle
->
sendMessageOnLink
(
_vehicle
->
priorityLink
(),
msg
);
qCDebug
(
CameraControl
LogVerbose
)
<<
"Request all parameters"
;
qCDebug
(
CameraControl
VerboseLog
)
<<
"Request all parameters"
;
}
//-----------------------------------------------------------------------------
...
...
@@ -1202,7 +1202,7 @@ QGCCameraControl::_updateActiveList()
}
}
if
(
active
!=
_activeSettings
)
{
qCDebug
(
CameraControl
LogVerbose
)
<<
"Excluding"
<<
exclusionList
;
qCDebug
(
CameraControl
VerboseLog
)
<<
"Excluding"
<<
exclusionList
;
_activeSettings
=
active
;
emit
activeSettingsChanged
();
//-- Force validity of "Facts" based on active set
...
...
@@ -1223,7 +1223,7 @@ QGCCameraControl::_processConditionTest(const QString conditionTest)
TEST_GREATER
,
TEST_SMALLER
};
qCDebug
(
CameraControl
LogVerbose
)
<<
"_processConditionTest("
<<
conditionTest
<<
")"
;
qCDebug
(
CameraControl
VerboseLog
)
<<
"_processConditionTest("
<<
conditionTest
<<
")"
;
int
op
=
TEST_NONE
;
QStringList
test
;
if
(
conditionTest
.
contains
(
"!="
))
{
...
...
@@ -1267,7 +1267,7 @@ QGCCameraControl::_processConditionTest(const QString conditionTest)
bool
QGCCameraControl
::
_processCondition
(
const
QString
condition
)
{
qCDebug
(
CameraControl
LogVerbose
)
<<
"_processCondition("
<<
condition
<<
")"
;
qCDebug
(
CameraControl
VerboseLog
)
<<
"_processCondition("
<<
condition
<<
")"
;
bool
result
=
true
;
bool
andOp
=
true
;
if
(
!
condition
.
isEmpty
())
{
...
...
@@ -1306,10 +1306,10 @@ QGCCameraControl::_updateRanges(Fact* pFact)
Fact
*
pRFact
=
getFact
(
pRange
->
param
);
//-- This parameter
Fact
*
pTFact
=
getFact
(
pRange
->
targetParam
);
//-- The target parameter (the one its range is to change)
if
(
pRFact
&&
pTFact
)
{
//qCDebug(CameraControl
LogVerbose
) << "Check new set of options for" << pTFact->name();
//qCDebug(CameraControl
VerboseLog
) << "Check new set of options for" << pTFact->name();
QString
option
=
pRFact
->
rawValueString
();
//-- This parameter value
//-- If this value (and condition) triggers a change in the target range
//qCDebug(CameraControl
LogVerbose
) << "Range value:" << pRange->value << "Current value:" << option << "Condition:" << pRange->condition;
//qCDebug(CameraControl
VerboseLog
) << "Range value:" << pRange->value << "Current value:" << option << "Condition:" << pRange->condition;
if
(
pRange
->
value
==
option
&&
_processCondition
(
pRange
->
condition
))
{
if
(
pTFact
->
enumStrings
()
!=
pRange
->
optNames
)
{
//-- Set limited range set
...
...
@@ -1340,7 +1340,7 @@ QGCCameraControl::_updateRanges(Fact* pFact)
_paramIO
[
f
->
name
()]
->
optNames
=
rangesSet
[
f
]
->
optNames
;
_paramIO
[
f
->
name
()]
->
optVariants
=
rangesSet
[
f
]
->
optVariants
;
emit
f
->
enumsChanged
();
qCDebug
(
CameraControl
LogVerbose
)
<<
"Limited set of options for:"
<<
f
->
name
()
<<
rangesSet
[
f
]
->
optNames
;;
qCDebug
(
CameraControl
VerboseLog
)
<<
"Limited set of options for:"
<<
f
->
name
()
<<
rangesSet
[
f
]
->
optNames
;;
updates
<<
f
->
name
();
}
}
...
...
@@ -1351,7 +1351,7 @@ QGCCameraControl::_updateRanges(Fact* pFact)
_paramIO
[
f
->
name
()]
->
optNames
=
_originalOptNames
[
rangesReset
[
f
]];
_paramIO
[
f
->
name
()]
->
optVariants
=
_originalOptValues
[
rangesReset
[
f
]];
emit
f
->
enumsChanged
();
qCDebug
(
CameraControl
LogVerbose
)
<<
"Restore full set of options for:"
<<
f
->
name
()
<<
_originalOptNames
[
f
->
name
()];
qCDebug
(
CameraControl
VerboseLog
)
<<
"Restore full set of options for:"
<<
f
->
name
()
<<
_originalOptNames
[
f
->
name
()];
updates
<<
f
->
name
();
}
}
...
...
@@ -1781,7 +1781,7 @@ QGCCameraControl::_loadRanges(QDomNode option, const QString factName, QString p
if
(
optNames
.
size
())
{
QGCCameraOptionRange
*
pRange
=
new
QGCCameraOptionRange
(
this
,
factName
,
paramValue
,
param
,
condition
,
optNames
,
optValues
);
_optionRanges
.
append
(
pRange
);
qCDebug
(
CameraControl
LogVerbose
)
<<
"New range limit:"
<<
factName
<<
paramValue
<<
param
<<
condition
<<
optNames
<<
optValues
;
qCDebug
(
CameraControl
VerboseLog
)
<<
"New range limit:"
<<
factName
<<
paramValue
<<
param
<<
condition
<<
optNames
<<
optValues
;
}
}
}
...
...
src/Camera/QGCCameraControl.h
View file @
c0aec101
...
...
@@ -15,7 +15,7 @@ class QDomNodeList;
class
QGCCameraParamIO
;
Q_DECLARE_LOGGING_CATEGORY
(
CameraControlLog
)
Q_DECLARE_LOGGING_CATEGORY
(
CameraControl
LogVerbose
)
Q_DECLARE_LOGGING_CATEGORY
(
CameraControl
VerboseLog
)
//-----------------------------------------------------------------------------
class
QGCVideoStreamInfo
:
public
QObject
...
...
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