refactor, added akku menu, finished autopilot menu

This commit is contained in:
2022-02-05 13:46:52 +01:00
parent b4a5814ef1
commit aa9bf99349
19 changed files with 270 additions and 55 deletions
-4
View File
@@ -78,14 +78,11 @@ CourseCorrection Navigation::getCourseCorrection() {
}
bool Navigation::addCurrentPosToRoute() {
std::cout << "Navigation::addCurrentPosToRoute 1" << std::endl;
Point p = this->currentLocation();
std::cout << "Navigation::addCurrentPosToRoute " << p.lat << " " << p.lon << std::endl;
if (!p.isValid()) { return false; }
// First Point
if (this->route->getRouteInfo().totalPoints == 0) {
std::cout << "Navigation::addCurrentPosToRoute 2" << std::endl;
this->route->addPointToRoute(p);
this->lastPoint = p;
return true;
@@ -93,7 +90,6 @@ bool Navigation::addCurrentPosToRoute() {
// Ever Point after the first
if (MIN_DISTANCE_BETWEEN_POINTS <= this->distanceBetwenn(p, this->lastPoint)) {
std::cout << "Navigation::addCurrentPosToRoute 3" << std::endl;
this->route->addPointToRoute(p);
this->lastPoint = p;
return true;