simplify menus
This commit is contained in:
@@ -37,25 +37,13 @@ void MenuManualControl::printPage() const {
|
||||
case 2:
|
||||
lineOne = "Speed: ";
|
||||
lineOne.concat(this->manualControl->getMaxSpeed());
|
||||
lineTwo = "Increase by 0.1";
|
||||
lineTwo = "- dec 0.1 inc +";
|
||||
break;
|
||||
|
||||
case 3:
|
||||
lineOne = "Speed: ";
|
||||
lineOne.concat(this->manualControl->getMaxSpeed());
|
||||
lineTwo = "Decrease by 0.1";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
lineOne = "RotSpeed: ";
|
||||
lineOne.concat(this->manualControl->getMaxRotation());
|
||||
lineTwo = "Increase by 0.1";
|
||||
break;
|
||||
|
||||
case 5:
|
||||
lineOne = "RotSpeed: ";
|
||||
lineOne.concat(this->manualControl->getMaxRotation());
|
||||
lineTwo = "Decrease by 0.1";
|
||||
lineTwo = "- dec 0.1 inc +";
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -70,7 +58,7 @@ void MenuManualControl::init() {
|
||||
this->firstPrint = false;
|
||||
this->driveManager->changeModus(Modi::ManualControl);
|
||||
this->manualControl = (ManualControl*) this->driveManager->getDriveModiPtr();
|
||||
this->setCountPages(6);
|
||||
this->setCountPages(4);
|
||||
this->updateDelay = 500;
|
||||
}
|
||||
|
||||
@@ -85,14 +73,6 @@ void MenuManualControl::runCommand() const {
|
||||
break;
|
||||
|
||||
case 3:
|
||||
this->manualControl->decreaseMaxSpeed();
|
||||
break;
|
||||
|
||||
case 4:
|
||||
this->manualControl->increaseMaxRotation();
|
||||
break;
|
||||
|
||||
case 5:
|
||||
this->manualControl->increaseMaxRotation();
|
||||
break;
|
||||
|
||||
@@ -100,3 +80,19 @@ void MenuManualControl::runCommand() const {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void MenuManualControl::runCommandNo() const {
|
||||
switch (this->getCurrentPage())
|
||||
{
|
||||
case 2:
|
||||
this->manualControl->decreaseMaxSpeed();
|
||||
break;
|
||||
|
||||
case 3:
|
||||
this->manualControl->decreaseMaxRotation();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user