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();
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class Autopilot : public ManualControl {
|
||||
uint32_t lastAutopilotChangeMillis = 0;
|
||||
|
||||
double drivingSpeed = 1;
|
||||
double rotationSpeed = 3;
|
||||
double rotationSpeed = 4.5;
|
||||
double minRemainingDistance = 0.25;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user