small fixes
This commit is contained in:
@@ -119,10 +119,10 @@ void Autopilot::drive() {
|
||||
void Autopilot::rotate() {
|
||||
this->moveControl->setSpeed(0);
|
||||
if (this->courseCorrection.correction > 0)
|
||||
this->moveControl->setRotationSpeed(this->rotationSpeed);
|
||||
this->moveControl->setRotationSpeed(-this->rotationSpeed);
|
||||
else
|
||||
|
||||
this->moveControl->setRotationSpeed(-this->rotationSpeed);
|
||||
this->moveControl->setRotationSpeed(this->rotationSpeed);
|
||||
}
|
||||
|
||||
void Autopilot::checkButtonInput() {
|
||||
@@ -172,10 +172,8 @@ void Autopilot::askNavigationForOrder() {
|
||||
}
|
||||
|
||||
void Autopilot::selfDriving() {
|
||||
if (this->lastOrderStatus == Navigation::Status::Updated) {
|
||||
if (abs(this->courseCorrection.correction) >= this->maxCourseDeviationBerforeAct)
|
||||
this->rotate();
|
||||
else
|
||||
this->drive();
|
||||
}
|
||||
if (abs(this->courseCorrection.correction) >= this->maxCourseDeviationBerforeAct)
|
||||
this->rotate();
|
||||
else
|
||||
this->drive();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user