Update all Menus to new Print function

This commit is contained in:
2023-01-04 10:35:49 +01:00
parent 04109d82e6
commit 1147cb4eb6
7 changed files with 22 additions and 69 deletions
@@ -60,15 +60,7 @@ void MenuAutopilot::printMenu() {
}
}
if (this->lcd) {
this->lcd->clear();
this->lcd->setCursor(0, 0);
this->lcd->print(buf1);
this->lcd->setCursor(0, 1);
this->lcd->print(buf2);
}
std::cout << buf1 << " " << buf2 << std::endl;
this->print(buf1, buf2);
}
void MenuAutopilot::update() {
@@ -16,15 +16,10 @@ void MenuCaptureRoute::printMenu() {
this->routeInfo = this->captureRoute->getRouteInfo();
if (this->lcd) {
this->lcd->clear();
this->lcd->setCursor(0, 0);
this->lcd->printf("Points: %u", this->routeInfo.totalPoints);
this->lcd->setCursor(0, 1);
this->lcd->print("du fahren. :-)");
String lineOne = "Points: ";
String lineTwo = "You can drive.";
}
std::cout << "Points: " << this->routeInfo.totalPoints << " du fahren. :-)" << std::endl;
lineTwo.concat(this->routeInfo.totalPoints);
}
void MenuCaptureRoute::update() {
@@ -11,14 +11,5 @@
#include "menuManualDrive.h"
void MenuManualControl::printMenu() {
this->driveManager->changeModus(Modi::ManualControl);
if (this->lcd) {
this->lcd->clear();
this->lcd->setCursor(0, 0);
this->lcd->print("Jetzt kannst");
this->lcd->setCursor(0, 1);
this->lcd->print("du fahren. :-)");
}
std::cout << "Jetzt kannst du\n fahren. :-)" << std::endl;
this->print("Now you can", "drive. :)");
}
@@ -36,11 +36,6 @@ class MenuDriveMode : public MenuControl {
virtual void printMenu() = 0;
/**
* @brief can be called to update shown data
*/
void update(){}
protected:
DriveManager* driveManager;
bool firstPrint = true;