added freeze target point
This commit is contained in:
@@ -145,6 +145,14 @@ void MenuAutopilot::printPage() const {
|
||||
this->autopilot->restart();
|
||||
break;
|
||||
|
||||
case 7:
|
||||
lineOne = "Freeze target is";
|
||||
if (this->targetFreezed)
|
||||
lineTwo = "activated";
|
||||
else
|
||||
lineTwo = "deactivated";
|
||||
break;
|
||||
|
||||
default:
|
||||
this->printDefault();
|
||||
return;
|
||||
@@ -158,6 +166,13 @@ void MenuAutopilot::runCommand() const {
|
||||
case 6:
|
||||
this->autopilot->restart();
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (this->targetFreezed)
|
||||
this->driveManager->getNavigation()->freezeTargetPoint(false);
|
||||
else
|
||||
this->driveManager->getNavigation()->freezeTargetPoint();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -173,7 +188,7 @@ void MenuAutopilot::update() {
|
||||
}
|
||||
|
||||
void MenuAutopilot::init() {
|
||||
this->setCountPages(7);
|
||||
this->setCountPages(8);
|
||||
this->driveManager->changeModus(Modi::Autopilot);
|
||||
this->autopilot = (Autopilot*) this->driveManager->getDriveModiPtr();
|
||||
this->routeInfo = this->autopilot->getRouteInfo();
|
||||
|
||||
@@ -47,6 +47,8 @@ class MenuAutopilot : public MenuDriveMode {
|
||||
private:
|
||||
void init() override;
|
||||
|
||||
bool targetFreezed = false;
|
||||
|
||||
Autopilot* autopilot;
|
||||
RouteInfo routeInfo;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user