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
1f7a7157
Commit
1f7a7157
authored
Apr 16, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assume param dups are not fatal
If we get a dup, clear the default value since we can’t trust it
parent
c2d5f6a2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
PX4ParameterLoader.cc
src/AutoPilotPlugins/PX4/PX4ParameterLoader.cc
+16
-12
No files found.
src/AutoPilotPlugins/PX4/PX4ParameterLoader.cc
View file @
1f7a7157
...
...
@@ -145,7 +145,7 @@ void PX4ParameterLoader::loadParameterFactMetaData(void)
qWarning
()
<<
"Badly formed XML"
;
return
;
}
if
(
intVersion
<=
1
)
{
if
(
intVersion
<=
2
)
{
// We can't read these old files
qDebug
()
<<
"Parameter version stamp too old, skipping load"
<<
parameterFilename
;
return
;
...
...
@@ -218,9 +218,12 @@ void PX4ParameterLoader::loadParameterFactMetaData(void)
metaData
=
new
FactMetaData
(
foundType
);
Q_CHECK_PTR
(
metaData
);
metaData
->
setGroup
(
factGroup
);
if
(
!
_mapParameterName2FactMetaData
.
contains
(
name
))
{
if
(
_mapParameterName2FactMetaData
.
contains
(
name
))
{
// We can't trust the default value since we have dups
qDebug
()
<<
"Duplicate parameter found:"
<<
name
;
_mapParameterName2FactMetaData
[
name
]
->
clearDefaultValue
();
}
else
{
_mapParameterName2FactMetaData
[
name
]
=
metaData
;
}
if
(
xml
.
attributes
().
hasAttribute
(
"default"
))
{
bool
convertOk
;
...
...
@@ -232,6 +235,7 @@ void PX4ParameterLoader::loadParameterFactMetaData(void)
qDebug
()
<<
"Parameter meta data with bad default value, name:"
<<
name
<<
" type:"
<<
type
<<
" default:"
<<
strDefault
;
}
}
}
}
else
{
// We should be getting meta data now
...
...
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