Commit 7612232d authored by Valentin Platzgummer's avatar Valentin Platzgummer

code not passing assertions

parent 570fbc03
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment