run callback in digatalControl only after rotation

finished
This commit is contained in:
2023-08-09 14:37:22 +02:00
parent a00ee4080c
commit 984c1891e1
2 changed files with 8 additions and 2 deletions
@@ -85,5 +85,10 @@ void ManualControl::digitalControl() {
this->moveControl->setRotationSpeed(0);
if (this->directionChangeWrapper && (x > 120 || x < -120))
this->directionChangeWrapper->action();
this->lastLoopTurned = true;
else if (this->lastLoopTurned) {
if (this->directionChangeWrapper)
this->directionChangeWrapper->action();
this->lastLoopTurned = false;
}
}