integrated menuInformationsSites to
driveMenu items
This commit is contained in:
@@ -10,16 +10,32 @@
|
||||
*/
|
||||
#include "menuCaptureRoute.h"
|
||||
|
||||
void MenuCaptureRoute::printMenu() {
|
||||
if (this->firstPrint)
|
||||
this->init();
|
||||
void MenuCaptureRoute::printPage() const {
|
||||
RouteInfo routeInfo = this->captureRoute->getRouteInfo();
|
||||
uint8_t currentPage = this->getCurrentPage();
|
||||
|
||||
String lineOne = "";
|
||||
String lineTwo = "";
|
||||
|
||||
this->routeInfo = this->captureRoute->getRouteInfo();
|
||||
switch (currentPage)
|
||||
{
|
||||
case 0:
|
||||
lineOne = "Points: ";
|
||||
lineOne.concat(routeInfo.totalPoints);
|
||||
lineTwo = "You can drive.";
|
||||
break;
|
||||
|
||||
String lineOne = "Points: ";
|
||||
String lineTwo = "You can drive.";
|
||||
|
||||
lineOne.concat(this->routeInfo.totalPoints);
|
||||
case 1:
|
||||
lineOne = "Average distance";
|
||||
lineTwo = "xxx meters";
|
||||
break;
|
||||
|
||||
default:
|
||||
lineOne = "Unkown page";
|
||||
lineTwo = "Number: ";
|
||||
lineTwo.concat(currentPage);
|
||||
break;
|
||||
}
|
||||
|
||||
this->print(lineOne, lineTwo);
|
||||
}
|
||||
@@ -31,7 +47,7 @@ void MenuCaptureRoute::update() {
|
||||
}
|
||||
|
||||
void MenuCaptureRoute::init() {
|
||||
this->firstPrint = false;
|
||||
this->setCountPages(4);
|
||||
this->driveManager->changeModus(Modi::CaptureRoute);
|
||||
this->captureRoute = (CaptureRoute*) this->driveManager->getDriveModiPtr();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user