Pass gamepad to all objects
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user