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