bugfix when enter get right routeInfo
This commit is contained in:
@@ -14,6 +14,8 @@ void MenuCaptureRoute::printMenu() {
|
||||
if (this->firstPrint)
|
||||
this->init();
|
||||
|
||||
this->routeInfo = this->captureRoute->getRouteInfo();
|
||||
|
||||
if (this->lcd) {
|
||||
this->lcd->clear();
|
||||
this->lcd->setCursor(0, 0);
|
||||
@@ -28,7 +30,6 @@ void MenuCaptureRoute::printMenu() {
|
||||
void MenuCaptureRoute::update() {
|
||||
if (!this->captureRoute->shouldUpdate())
|
||||
return;
|
||||
this->routeInfo = this->captureRoute->getRouteInfo();
|
||||
this->printMenu();
|
||||
}
|
||||
|
||||
@@ -36,5 +37,5 @@ void MenuCaptureRoute::init() {
|
||||
this->firstPrint = false;
|
||||
this->driveManager->changeModus(Modi::CaptureRoute);
|
||||
this->captureRoute = (CaptureRoute*) this->driveManager->getDriveModiPtr();
|
||||
this->routeInfo = this->captureRoute->getRouteInfo();
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
CaptureRoute::CaptureRoute(MoveControl* moveControl, Ps3Controller *gamepad, Navigation* navigation)
|
||||
: ManualControl(moveControl, gamepad) {
|
||||
this->navigation = navigation;
|
||||
this->routeInfo = RouteInfo{0, 0};
|
||||
this->routeInfo = navigation->getRouteInfo();
|
||||
}
|
||||
|
||||
void CaptureRoute::loop() {
|
||||
|
||||
Reference in New Issue
Block a user