ready to test capture Route and Autopiloz

This commit is contained in:
2022-02-03 19:50:48 +01:00
parent 5ca21b09b2
commit bc37abcb66
20 changed files with 226 additions and 39 deletions
+9
View File
@@ -23,14 +23,23 @@ Point Route::startRoute() {
if (this->points.size() < 1)
return Point(0, 0);
*this->it = this->points.begin();
this->currentPoint = 1;
return **this->it;
}
Point Route::getNextPoint() {
if (*this->it != this->points.end()) {
this->it++;
this->currentPoint++;
return **this->it;
}
else
return Point(0, 0);
}
RouteInfo Route::getRouteInfo() {
RouteInfo info;
info.totalPoints = this->points.size();
info.currentPoint = this->currentPoint;
return info;
}