This commit is contained in:
2022-12-18 10:33:04 +01:00
parent 377b0ea03b
commit a5cf2f2c1d
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -144,7 +144,7 @@ bool Navigation::addCurrentPosToRoute() {
return true;
}
// Ever Point after the first
// Every Point after the first
if (MIN_DISTANCE_BETWEEN_POINTS <= this->currentPosition.distanceTo(this->lastPoint)) {
this->route->addPointToRoute(this->currentPosition);
this->lastPoint = this->currentPosition;
@@ -170,10 +170,10 @@ void Navigation::updateCurrentLocation() {
}
bool Navigation::nextPoint() {
if (!this->navigationStarted)
return false;
Point newTargetPoint = this->route->getNextPoint();
return this->setTargetPoint(newTargetPoint);
return this->setTargetPoint(this->route->getNextPoint());
}
bool Navigation::setTargetPoint(Point target) {
+1 -1
View File
@@ -15,7 +15,7 @@ Autopilot::Autopilot(MoveControl* moveControl, Navigation* navigation)
: ManualControl(moveControl) {
this->navigation = navigation;
this->navigationStarted = this->navigation->startNavigation();
this->navigation->getRouteInfo();
this->routeInfo = this->navigation->getRouteInfo();
this->courseCorrection.correction = 0;
this->courseCorrection.distance = 0;
this->updateDisplay = true;