From 7612232daa73acaa0563d366d0ea45542f947a09 Mon Sep 17 00:00:00 2001 From: Valentin Platzgummer Date: Fri, 24 Jul 2020 16:41:56 +0200 Subject: [PATCH] code not passing assertions --- src/Wima/WaypointManager/DefaultManager.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Wima/WaypointManager/DefaultManager.cpp b/src/Wima/WaypointManager/DefaultManager.cpp index 07d3632d0..fbdadf1a3 100644 --- a/src/Wima/WaypointManager/DefaultManager.cpp +++ b/src/Wima/WaypointManager/DefaultManager.cpp @@ -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 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(); -- 2.22.0