Skip to content

Commit f1d73b0

Browse files
committedNov 15, 2024·
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.
1 parent 13d2e42 commit f1d73b0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎drivetrain/controlStrategies/autoDrive.py

+1
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,6 @@ def update(self, cmdIn: DrivetrainCommand, curPose: Pose2d) -> DrivetrainCommand
113113
#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)
114114
if self.stuckTracker >= 10:
115115
retCmd = cmdIn #set the returned cmd to the cmd that we were originally given.
116+
self.stuckTracker += 1
116117

117118
return retCmd

0 commit comments

Comments
 (0)
Please sign in to comment.