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
9f3b5b78
Commit
9f3b5b78
authored
Mar 04, 2017
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uninitialized variable used in fmin/fmax.
parent
45cb473c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
MissionController.cc
src/MissionManager/MissionController.cc
+8
-6
No files found.
src/MissionManager/MissionController.cc
View file @
9f3b5b78
...
...
@@ -1392,26 +1392,28 @@ void MissionController::_addPlannedHomePosition(Vehicle* vehicle, QmlObjectListM
visualItems
->
insert
(
0
,
homeItem
);
if
(
visualItems
->
count
()
>
1
&&
addToCenter
)
{
double
north
,
south
,
east
,
west
;
double
north
=
0.0
;
double
south
=
0.0
;
double
east
=
0.0
;
double
west
=
0.0
;
bool
firstCoordSet
=
false
;
for
(
int
i
=
1
;
i
<
visualItems
->
count
();
i
++
)
{
VisualMissionItem
*
item
=
qobject_cast
<
VisualMissionItem
*>
(
visualItems
->
get
(
i
));
if
(
item
->
specifiesCoordinate
())
{
if
(
firstCoordSet
)
{
double
lat
=
_normalizeLat
(
item
->
coordinate
().
latitude
());
double
lon
=
_normalizeLon
(
item
->
coordinate
().
longitude
());
north
=
fmax
(
north
,
lat
);
south
=
fmin
(
south
,
lat
);
east
=
fmax
(
east
,
lon
);
west
=
fmin
(
west
,
lon
);
east
=
fmax
(
east
,
lon
);
west
=
fmin
(
west
,
lon
);
}
else
{
firstCoordSet
=
true
;
north
=
_normalizeLat
(
item
->
coordinate
().
latitude
());
south
=
north
;
east
=
_normalizeLon
(
item
->
coordinate
().
longitude
());
west
=
east
;
east
=
_normalizeLon
(
item
->
coordinate
().
longitude
());
west
=
east
;
}
}
}
...
...
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