Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
7612232d
Commit
7612232d
authored
Jul 24, 2020
by
Valentin Platzgummer
Browse files
code not passing assertions
parent
570fbc03
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Wima/WaypointManager/DefaultManager.cpp
View file @
7612232d
...
...
@@ -136,7 +136,6 @@ bool WaypointManager::DefaultManager::_worker()
return
false
;
}
if
(
!
_calcShortestPath
(
_settings
->
homePosition
(),
_currentWaypoints
.
first
(),
arrivalPath
)
)
{
Q_ASSERT
(
false
);
qWarning
(
"WaypointManager::DefaultManager::next(): Not able to calc path from home position to first waypoint."
);
return
false
;
}
...
...
@@ -148,11 +147,10 @@ bool WaypointManager::DefaultManager::_worker()
qDebug
()
<<
"_currentWaypoints.last(): "
<<
_currentWaypoints
.
last
();
qDebug
()
<<
"_settings->homePosition(): "
<<
_settings
->
homePosition
();
QVector
<
QGeoCoordinate
>
returnPath
;
//if ( !_calcShortestPath(_currentWaypoints.last(), _settings->homePosition(), returnPath) ) {
if
(
!
_calcShortestPath
(
_settings
->
homePosition
(),
_currentWaypoints
.
first
(),
returnPath
)
)
{
Q_ASSERT
(
false
);
if
(
!
_calcShortestPath
(
_currentWaypoints
.
last
(),
_settings
->
homePosition
(),
returnPath
)
)
{
//if ( !_calcShortestPath(_settings->homePosition(), _currentWaypoints.first(), returnPath) ) {
qWarning
(
"WaypointManager::DefaultManager::next(): Not able to calc path from home position to last waypoint."
);
//
return false;
return
false
;
}
returnPath
.
removeFirst
();
returnPath
.
removeLast
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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