some code quality

This commit is contained in:
2023-08-14 07:11:03 +02:00
parent 38c8a58988
commit 147eea1f92
4 changed files with 18 additions and 2 deletions
+4
View File
@@ -1,3 +1,7 @@
-> Program underfloorLighting
-> Add an beeper
-> Program the beeper
Capture Route Punkte auch nicht zu weit auseinander
Autopilot Funktionen zum einstellen der Geschwindigkeiten
Speedometer zweiter Buffer mit auslesezeiten, weil sonst Sinnlos da kein zeitliche Refernez zu berechnen vorhanden
+9
View File
@@ -0,0 +1,9 @@
void KomponenteA::loop() {
this->komponenteB->loop();
this->komponenteC->loop();
if (millis() - this->lastMillis < this->delayMillis)
return;
this->doSomething();
}
+3
View File
@@ -122,6 +122,7 @@ class Navigation {
double increaseMinDistanceToReachPoint() { return this->minDistanceToReachPoint += 0.1; }
double decreaseMinDistanceToReachPoint() { return this->minDistanceToReachPoint -= 0.1; }
// TODO: Dokumentation korrigieren.
/**
* @brief Get the Course Correction object
*
@@ -133,6 +134,8 @@ class Navigation {
*/
Status getCourseCorrection(CourseCorrection& correction, bool forceUpdate = false);
// TODO: Dokumentation korrigieren.
/**
* @brief Tries to add the current Position to the route
*
@@ -43,9 +43,9 @@ void ManualControl::runManualControl() {
// std::cout << "x: " << (int) x << " y: " << (int) y << std::endl;
// }
double value_per_step = this->max_speed * 2 / 256;
double value_per_step = this->max_speed * 2 / UINT8_MAX;
this->moveControl->setSpeed(-y * value_per_step);
value_per_step = this->max_rotation * 2 / 256;
value_per_step = this->max_rotation * 2 / UINT8_MAX;
this->moveControl->setRotationSpeed(x * value_per_step);
}