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
da5971a5
Commit
da5971a5
authored
Nov 23, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better logging, plus some retry fixes
parent
d1cc23a2
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
90 deletions
+127
-90
ParameterManager.cc
src/FactSystem/ParameterManager.cc
+119
-81
ParameterManager.h
src/FactSystem/ParameterManager.h
+8
-9
No files found.
src/FactSystem/ParameterManager.cc
View file @
da5971a5
This diff is collapsed.
Click to expand it.
src/FactSystem/ParameterManager.h
View file @
da5971a5
...
...
@@ -28,7 +28,8 @@
/// @file
/// @author Don Gagne <don@thegagnes.com>
Q_DECLARE_LOGGING_CATEGORY
(
ParameterManagerVerboseLog
)
Q_DECLARE_LOGGING_CATEGORY
(
ParameterManagerVerbose1Log
)
Q_DECLARE_LOGGING_CATEGORY
(
ParameterManagerVerbose2Log
)
/// Connects to Parameter Manager to load/update Facts
class
ParameterManager
:
public
QObject
...
...
@@ -123,9 +124,6 @@ signals:
/// Signalled to update progress of full parameter list request
void
parameterListProgress
(
float
value
);
/// Signalled to ourselves in order to get call on our own thread
void
restartWaitingParamTimer
(
void
);
protected:
Vehicle
*
_vehicle
;
...
...
@@ -133,7 +131,6 @@ protected:
void
_parameterUpdate
(
int
vehicleId
,
int
componentId
,
QString
parameterName
,
int
parameterCount
,
int
parameterId
,
int
mavType
,
QVariant
value
);
void
_valueUpdated
(
const
QVariant
&
value
);
void
_restartWaitingParamTimer
(
void
);
void
_waitingParamTimeout
(
void
);
void
_tryCacheLookup
(
void
);
void
_initialRequestTimeout
(
void
);
...
...
@@ -150,6 +147,7 @@ private:
void
_addMetaDataToDefaultComponent
(
void
);
QString
_remapParamNameToVersion
(
const
QString
&
paramName
);
void
_loadOfflineEditingParams
(
void
);
QString
_logVehiclePrefix
(
int
componentId
=
-
1
);
MAV_PARAM_TYPE
_factTypeToMavType
(
FactMetaData
::
ValueType_t
factType
);
FactMetaData
::
ValueType_t
_mavTypeToFactType
(
MAV_PARAM_TYPE
mavType
);
...
...
@@ -183,10 +181,11 @@ private:
int
_prevWaitingWriteParamNameCount
;
static
const
int
_maxInitialRequestListRetry
=
4
;
///< Maximum retries for request list
int
_initialRequestRetryCount
;
///< Current retry count for request list
static
const
int
_maxInitialLoadRetrySingleParam
=
10
;
///< Maximum retries for initial index based load of a single param
static
const
int
_maxReadWriteRetry
=
5
;
///< Maximum retries read/write
static
const
int
_maxInitialRequestListRetry
=
4
;
///< Maximum retries for request list
int
_initialRequestRetryCount
;
///< Current retry count for request list
static
const
int
_maxInitialLoadRetrySingleParam
=
5
;
///< Maximum retries for initial index based load of a single param
static
const
int
_maxReadWriteRetry
=
5
;
///< Maximum retries read/write
bool
_disableAllRetries
;
///< true: Don't retry any requests (used for testing)
QMap
<
int
,
int
>
_paramCountMap
;
///< Key: Component id, Value: count of parameters in this component
QMap
<
int
,
QMap
<
int
,
int
>
>
_waitingReadParamIndexMap
;
///< Key: Component id, Value: Map { Key: parameter index still waiting for, Value: retry count }
...
...
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