Skip to content

Commit

Permalink
Fixed issue caused by slight change in logic between the old and new …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
1736student committed Nov 15, 2024
1 parent 13d2e42 commit f1d73b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivetrain/controlStrategies/autoDrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f1d73b0

Please sign in to comment.