start implementation of routeCache
This commit is contained in:
@@ -38,6 +38,7 @@ Have to:
|
|||||||
-> check new distance calculation between points
|
-> check new distance calculation between points
|
||||||
-> check new course calculation between points
|
-> check new course calculation between points
|
||||||
-> menu route data und ui disconnecten
|
-> menu route data und ui disconnecten
|
||||||
|
-> use routeCache in captureRoute and autopilot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
#include "route.h"
|
#include "route.h"
|
||||||
|
|
||||||
|
Route Route::routeCache = Route();
|
||||||
|
|
||||||
void Route::addPointToRoute(Point point)
|
void Route::addPointToRoute(Point point)
|
||||||
{
|
{
|
||||||
this->points.push_back(point);
|
this->points.push_back(point);
|
||||||
@@ -99,3 +101,7 @@ RouteInfo Route::getRouteInfo()
|
|||||||
info.currentPoint = this->currentPoint;
|
info.currentPoint = this->currentPoint;
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Route& Route::getRouteCache() {
|
||||||
|
return Route::routeCache;
|
||||||
|
}
|
||||||
|
|||||||
@@ -100,12 +100,16 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool getStarted() const { return this->started; }
|
bool getStarted() const { return this->started; }
|
||||||
|
|
||||||
|
static Route& getRouteCache();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint16_t currentPoint = 0;
|
uint16_t currentPoint = 0;
|
||||||
bool started = false;
|
bool started = false;
|
||||||
|
|
||||||
std::list<Point> points;
|
std::list<Point> points;
|
||||||
std::list<Point>::iterator it;
|
std::list<Point>::iterator it;
|
||||||
|
|
||||||
|
static Route routeCache;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ROUTE_H
|
#endif // ROUTE_H
|
||||||
|
|||||||
Reference in New Issue
Block a user