Commit c0aec101 authored by Gus Grubba's avatar Gus Grubba

Fixed logging naming convention for camera control

parent df2aa913
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <QDomNodeList> #include <QDomNodeList>
QGC_LOGGING_CATEGORY(CameraControlLog, "CameraControlLog") QGC_LOGGING_CATEGORY(CameraControlLog, "CameraControlLog")
QGC_LOGGING_CATEGORY(CameraControlLogVerbose, "CameraControlLogVerbose") QGC_LOGGING_CATEGORY(CameraControlVerboseLog, "CameraControlVerboseLog")
static const char* kCondition = "condition"; static const char* kCondition = "condition";
static const char* kControl = "control"; static const char* kControl = "control";
...@@ -873,7 +873,7 @@ QGCCameraControl::_loadSettings(const QDomNodeList nodeList) ...@@ -873,7 +873,7 @@ QGCCameraControl::_loadSettings(const QDomNodeList nodeList)
//-- Check for updates //-- Check for updates
QStringList updates = _loadUpdates(parameterNode); QStringList updates = _loadUpdates(parameterNode);
if(updates.size()) { if(updates.size()) {
qCDebug(CameraControlLogVerbose) << "Parameter" << factName << "requires updates for:" << updates; qCDebug(CameraControlVerboseLog) << "Parameter" << factName << "requires updates for:" << updates;
_requestUpdates[factName] = updates; _requestUpdates[factName] = updates;
} }
//-- Build metadata //-- Build metadata
...@@ -907,7 +907,7 @@ QGCCameraControl::_loadSettings(const QDomNodeList nodeList) ...@@ -907,7 +907,7 @@ QGCCameraControl::_loadSettings(const QDomNodeList nodeList)
//-- Check for exclusions //-- Check for exclusions
QStringList exclusions = _loadExclusions(option); QStringList exclusions = _loadExclusions(option);
if(exclusions.size()) { if(exclusions.size()) {
qCDebug(CameraControlLogVerbose) << "New exclusions:" << factName << optValue << exclusions; qCDebug(CameraControlVerboseLog) << "New exclusions:" << factName << optValue << exclusions;
QGCCameraOptionExclusion* pExc = new QGCCameraOptionExclusion(this, factName, optValue, exclusions); QGCCameraOptionExclusion* pExc = new QGCCameraOptionExclusion(this, factName, optValue, exclusions);
QQmlEngine::setObjectOwnership(pExc, QQmlEngine::CppOwnership); QQmlEngine::setObjectOwnership(pExc, QQmlEngine::CppOwnership);
_valueExclusions.append(pExc); _valueExclusions.append(pExc);
...@@ -1136,7 +1136,7 @@ QGCCameraControl::_requestAllParameters() ...@@ -1136,7 +1136,7 @@ QGCCameraControl::_requestAllParameters()
static_cast<uint8_t>(_vehicle->id()), static_cast<uint8_t>(_vehicle->id()),
static_cast<uint8_t>(compID())); static_cast<uint8_t>(compID()));
_vehicle->sendMessageOnLink(_vehicle->priorityLink(), msg); _vehicle->sendMessageOnLink(_vehicle->priorityLink(), msg);
qCDebug(CameraControlLogVerbose) << "Request all parameters"; qCDebug(CameraControlVerboseLog) << "Request all parameters";
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -1202,7 +1202,7 @@ QGCCameraControl::_updateActiveList() ...@@ -1202,7 +1202,7 @@ QGCCameraControl::_updateActiveList()
} }
} }
if(active != _activeSettings) { if(active != _activeSettings) {
qCDebug(CameraControlLogVerbose) << "Excluding" << exclusionList; qCDebug(CameraControlVerboseLog) << "Excluding" << exclusionList;
_activeSettings = active; _activeSettings = active;
emit activeSettingsChanged(); emit activeSettingsChanged();
//-- Force validity of "Facts" based on active set //-- Force validity of "Facts" based on active set
...@@ -1223,7 +1223,7 @@ QGCCameraControl::_processConditionTest(const QString conditionTest) ...@@ -1223,7 +1223,7 @@ QGCCameraControl::_processConditionTest(const QString conditionTest)
TEST_GREATER, TEST_GREATER,
TEST_SMALLER TEST_SMALLER
}; };
qCDebug(CameraControlLogVerbose) << "_processConditionTest(" << conditionTest << ")"; qCDebug(CameraControlVerboseLog) << "_processConditionTest(" << conditionTest << ")";
int op = TEST_NONE; int op = TEST_NONE;
QStringList test; QStringList test;
if(conditionTest.contains("!=")) { if(conditionTest.contains("!=")) {
...@@ -1267,7 +1267,7 @@ QGCCameraControl::_processConditionTest(const QString conditionTest) ...@@ -1267,7 +1267,7 @@ QGCCameraControl::_processConditionTest(const QString conditionTest)
bool bool
QGCCameraControl::_processCondition(const QString condition) QGCCameraControl::_processCondition(const QString condition)
{ {
qCDebug(CameraControlLogVerbose) << "_processCondition(" << condition << ")"; qCDebug(CameraControlVerboseLog) << "_processCondition(" << condition << ")";
bool result = true; bool result = true;
bool andOp = true; bool andOp = true;
if(!condition.isEmpty()) { if(!condition.isEmpty()) {
...@@ -1306,10 +1306,10 @@ QGCCameraControl::_updateRanges(Fact* pFact) ...@@ -1306,10 +1306,10 @@ QGCCameraControl::_updateRanges(Fact* pFact)
Fact* pRFact = getFact(pRange->param); //-- This parameter Fact* pRFact = getFact(pRange->param); //-- This parameter
Fact* pTFact = getFact(pRange->targetParam); //-- The target parameter (the one its range is to change) Fact* pTFact = getFact(pRange->targetParam); //-- The target parameter (the one its range is to change)
if(pRFact && pTFact) { if(pRFact && pTFact) {
//qCDebug(CameraControlLogVerbose) << "Check new set of options for" << pTFact->name(); //qCDebug(CameraControlVerboseLog) << "Check new set of options for" << pTFact->name();
QString option = pRFact->rawValueString(); //-- This parameter value QString option = pRFact->rawValueString(); //-- This parameter value
//-- If this value (and condition) triggers a change in the target range //-- If this value (and condition) triggers a change in the target range
//qCDebug(CameraControlLogVerbose) << "Range value:" << pRange->value << "Current value:" << option << "Condition:" << pRange->condition; //qCDebug(CameraControlVerboseLog) << "Range value:" << pRange->value << "Current value:" << option << "Condition:" << pRange->condition;
if(pRange->value == option && _processCondition(pRange->condition)) { if(pRange->value == option && _processCondition(pRange->condition)) {
if(pTFact->enumStrings() != pRange->optNames) { if(pTFact->enumStrings() != pRange->optNames) {
//-- Set limited range set //-- Set limited range set
...@@ -1340,7 +1340,7 @@ QGCCameraControl::_updateRanges(Fact* pFact) ...@@ -1340,7 +1340,7 @@ QGCCameraControl::_updateRanges(Fact* pFact)
_paramIO[f->name()]->optNames = rangesSet[f]->optNames; _paramIO[f->name()]->optNames = rangesSet[f]->optNames;
_paramIO[f->name()]->optVariants = rangesSet[f]->optVariants; _paramIO[f->name()]->optVariants = rangesSet[f]->optVariants;
emit f->enumsChanged(); emit f->enumsChanged();
qCDebug(CameraControlLogVerbose) << "Limited set of options for:" << f->name() << rangesSet[f]->optNames;; qCDebug(CameraControlVerboseLog) << "Limited set of options for:" << f->name() << rangesSet[f]->optNames;;
updates << f->name(); updates << f->name();
} }
} }
...@@ -1351,7 +1351,7 @@ QGCCameraControl::_updateRanges(Fact* pFact) ...@@ -1351,7 +1351,7 @@ QGCCameraControl::_updateRanges(Fact* pFact)
_paramIO[f->name()]->optNames = _originalOptNames[rangesReset[f]]; _paramIO[f->name()]->optNames = _originalOptNames[rangesReset[f]];
_paramIO[f->name()]->optVariants = _originalOptValues[rangesReset[f]]; _paramIO[f->name()]->optVariants = _originalOptValues[rangesReset[f]];
emit f->enumsChanged(); emit f->enumsChanged();
qCDebug(CameraControlLogVerbose) << "Restore full set of options for:" << f->name() << _originalOptNames[f->name()]; qCDebug(CameraControlVerboseLog) << "Restore full set of options for:" << f->name() << _originalOptNames[f->name()];
updates << f->name(); updates << f->name();
} }
} }
...@@ -1781,7 +1781,7 @@ QGCCameraControl::_loadRanges(QDomNode option, const QString factName, QString p ...@@ -1781,7 +1781,7 @@ QGCCameraControl::_loadRanges(QDomNode option, const QString factName, QString p
if(optNames.size()) { if(optNames.size()) {
QGCCameraOptionRange* pRange = new QGCCameraOptionRange(this, factName, paramValue, param, condition, optNames, optValues); QGCCameraOptionRange* pRange = new QGCCameraOptionRange(this, factName, paramValue, param, condition, optNames, optValues);
_optionRanges.append(pRange); _optionRanges.append(pRange);
qCDebug(CameraControlLogVerbose) << "New range limit:" << factName << paramValue << param << condition << optNames << optValues; qCDebug(CameraControlVerboseLog) << "New range limit:" << factName << paramValue << param << condition << optNames << optValues;
} }
} }
} }
......
...@@ -15,7 +15,7 @@ class QDomNodeList; ...@@ -15,7 +15,7 @@ class QDomNodeList;
class QGCCameraParamIO; class QGCCameraParamIO;
Q_DECLARE_LOGGING_CATEGORY(CameraControlLog) Q_DECLARE_LOGGING_CATEGORY(CameraControlLog)
Q_DECLARE_LOGGING_CATEGORY(CameraControlLogVerbose) Q_DECLARE_LOGGING_CATEGORY(CameraControlVerboseLog)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class QGCVideoStreamInfo : public QObject class QGCVideoStreamInfo : public QObject
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment