small fixes

This commit is contained in:
2023-08-07 13:05:42 +02:00
parent 3549af2470
commit 8ed91c4b11
7 changed files with 16 additions and 13 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
#define PWMRES 8
#define POWERSTEPS 2 // A total of 20 levels ( 100 / SPEED_STEPS ) * RUN_MOTOR_CONTROL_DELAY = 500ms
#define PWMMIN 55
#define PWMMAX 90 // Max 98% of 2^PWM_RES
#define PWMMAX 94 // Max 98% of 2^PWM_RES
/**
* @brief A class which use PWM to control the power of DC Motor
+1
View File
@@ -134,6 +134,7 @@ Navigation::Status Navigation::getCourseCorrection(CourseCorrection& correction,
if (this->currentPosition.distanceTo(this->lastPointCalcCorrection) < (this->minDistanceToReachPoint / 2.0)
&& !forceUpdate) {
correction.correction = this->calculateCourseCorrection(this->lastPointCalcCorrection);
correction.distance = this->lastPointCalcCorrection.distanceTo(this->targetPoint);
return Status::Unchanged;
}