mirror of
https://github.com/modelec/odo_STM32.git
synced 2026-03-18 21:30:38 +01:00
PID
This commit is contained in:
@@ -99,7 +99,7 @@ void DiffBot::notifyWaypointReached(int reachedIndex)
|
|||||||
resetPID();
|
resetPID();
|
||||||
|
|
||||||
int nextIndex = (reachedIndex + 1) % MAX_WAYPOINTS;
|
int nextIndex = (reachedIndex + 1) % MAX_WAYPOINTS;
|
||||||
if (targets[nextIndex].active && targets[nextIndex].state != FINAL) {
|
if (targets[nextIndex].active && targets[reachedIndex].state != FINAL) {
|
||||||
index = nextIndex;
|
index = nextIndex;
|
||||||
} else {
|
} else {
|
||||||
motor.stop(true);
|
motor.stop(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user