fix: rover moved on after finished navigation

This commit is contained in:
2023-04-27 13:41:13 +02:00
parent 01710ab2ae
commit ac53e46e22
+1 -1
View File
@@ -48,10 +48,10 @@ void Autopilot::runAutopilot() {
this->setSelfDriving(ControlPadButton::isControlPadButtonPressed(this->input, ControlPadButton::PadButton::Action)); this->setSelfDriving(ControlPadButton::isControlPadButtonPressed(this->input, ControlPadButton::PadButton::Action));
if (this->routeInfo.currentPoint == this->routeInfo.totalPoints) { if (this->routeInfo.currentPoint == this->routeInfo.totalPoints) {
this->setSelfDriving(false);
this->navigationEnded = true; this->navigationEnded = true;
this->navigationStarted = false; this->navigationStarted = false;
this->selfDrivingAvailable = false; this->selfDrivingAvailable = false;
this->setSelfDriving(false);
} }
if (selfDriving) { if (selfDriving) {