fixed a bug that caused navigation not to stop

This commit is contained in:
2023-05-23 23:22:27 +02:00
parent 3a2c5b90f8
commit 1844a2a12e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -128,7 +128,7 @@ bool Navigation::getCourseCorrection(CourseCorrection& correction) {
return false;
// Check if I need a new Point
if (distance < MIN_DISTANCE_TO_REACH_POINT && !this->preventNextPoint) {
if (distance < MIN_DISTANCE_TO_REACH_POINT && this->preventNextPoint == false) {
if (!this->nextPoint()) {
this->navigationFinished = true;
this->navigationStarted = false;
@@ -199,7 +199,7 @@ bool Navigation::nextPoint() {
}
bool Navigation::setTargetPoint(Point target) {
if (target.isValid()) {
if (target.isInit()) {
this->targetPoint = target;
return true;
}