run callback in digatalControl only after rotation
finished
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user