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
7f43851e
Commit
7f43851e
authored
Jan 04, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2523 from DonLakeFlyer/DefaultCompId
Fix default comp id detection
parents
a8fbcbab
94a0e98f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
ParameterLoader.cc
src/FactSystem/ParameterLoader.cc
+8
-2
No files found.
src/FactSystem/ParameterLoader.cc
View file @
7f43851e
...
...
@@ -335,12 +335,18 @@ void ParameterLoader::_determineDefaultComponentId(void)
// the set of parameters. Better than nothing!
_defaultComponentId
=
-
1
;
int
largestCompParamCount
=
0
;
foreach
(
int
componentId
,
_mapParameterName2Variant
.
keys
())
{
if
(
_mapParameterName2Variant
[
componentId
].
count
()
>
_defaultComponentId
)
{
int
compParamCount
=
_mapParameterName2Variant
[
componentId
].
count
();
if
(
compParamCount
>
largestCompParamCount
)
{
largestCompParamCount
=
compParamCount
;
_defaultComponentId
=
componentId
;
}
}
Q_ASSERT
(
_defaultComponentId
!=
-
1
);
if
(
_defaultComponentId
==
-
1
)
{
qWarning
()
<<
"All parameters missing, unable to determine default componet id"
;
}
}
}
...
...
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