From f1d73b09e1a9b930695761bdcffce1cd7c399f13 Mon Sep 17 00:00:00 2001 From: Oryx Desktop Computer Date: Thu, 14 Nov 2024 18:59:40 -0600 Subject: [PATCH] Fixed issue caused by slight change in logic between the old and new version. Current behavior will just ignore the calculated command and just use the controller's instead. It still does the calculations for auto driving when its stuck but it just ignores the result. This can be changed later. Auto movement wont restart after being stuck until the auto button is pressed again. --- drivetrain/controlStrategies/autoDrive.py | 1 + 1 file changed, 1 insertion(+) diff --git a/drivetrain/controlStrategies/autoDrive.py b/drivetrain/controlStrategies/autoDrive.py index 6bc1268..724bcc5 100644 --- a/drivetrain/controlStrategies/autoDrive.py +++ b/drivetrain/controlStrategies/autoDrive.py @@ -113,5 +113,6 @@ def update(self, cmdIn: DrivetrainCommand, curPose: Pose2d) -> DrivetrainCommand #assume that we are either stuck or done if the counter reaches above 10. (sometimes it will get to like 4 when we are accelerating or taking a sharp turn) if self.stuckTracker >= 10: retCmd = cmdIn #set the returned cmd to the cmd that we were originally given. + self.stuckTracker += 1 return retCmd \ No newline at end of file