Pass gamepad to all objects

This commit is contained in:
2022-12-27 13:38:23 +01:00
parent a4e0007d64
commit 490473c2ee
10 changed files with 29 additions and 21 deletions
+4
View File
@@ -141,7 +141,9 @@ CourseCorrection Navigation::getCourseCorrection() {
}
bool Navigation::addCurrentPosToRoute() {
std::cout << "Navigation::addCurrentPosToRoute: 1" << std::endl;
if (!this->currentPosition.isValid()) { return false; }
std::cout << "Navigation::addCurrentPosToRoute: 2" << std::endl;
// First Point
if (this->route->getRouteInfo().totalPoints == 0) {
@@ -149,6 +151,7 @@ bool Navigation::addCurrentPosToRoute() {
this->lastPoint = this->currentPosition;
return true;
}
std::cout << "Navigation::addCurrentPosToRoute: 3" << std::endl;
// Every Point after the first
if (MIN_DISTANCE_BETWEEN_POINTS <= this->currentPosition.distanceTo(this->lastPoint)) {
@@ -156,6 +159,7 @@ bool Navigation::addCurrentPosToRoute() {
this->lastPoint = this->currentPosition;
return true;
}
std::cout << "Navigation::addCurrentPosToRoute: 4" << std::endl;
return false;
}