Skip to content

Commit 4802b6e

Browse files
committed
Fixed STOP logic in RedSideGoalAuto
1 parent 6531958 commit 4802b6e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

TeamCode/src/main/kotlin/pioneer/opmodes/auto/RedGoalSideAuto.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class RedGoalSideAuto : BaseOpMode() {
3232
GOAL,
3333
MID,
3434
AUDIENCE,
35+
DONE
3536
}
3637

3738
var state = State.GOTO_SHOOT
@@ -96,6 +97,7 @@ class RedGoalSideAuto : BaseOpMode() {
9697
CollectState.GOAL -> bot.follower.path = LinearPath(bot.pinpoint!!.pose, P.PREP_COLLECT_GOAL)
9798
CollectState.MID -> bot.follower.path = LinearPath(bot.pinpoint!!.pose, P.PREP_COLLECT_MID)
9899
CollectState.AUDIENCE -> bot.follower.path = LinearPath(bot.pinpoint!!.pose, P.PREP_COLLECT_AUDIENCE)
100+
CollectState.DONE -> state = State.STOP
99101
}
100102
bot.follower.start()
101103
}
@@ -114,6 +116,7 @@ class RedGoalSideAuto : BaseOpMode() {
114116
CollectState.GOAL -> bot.follower.path = LinearPath(bot.pinpoint!!.pose, P.COLLECT_GOAL)
115117
CollectState.MID -> bot.follower.path = LinearPath(bot.pinpoint!!.pose, P.COLLECT_MID)
116118
CollectState.AUDIENCE -> bot.follower.path = LinearPath(bot.pinpoint!!.pose, P.COLLECT_AUDIENCE)
119+
CollectState.DONE -> {}
117120
}
118121
bot.follower.start()
119122
}
@@ -124,8 +127,8 @@ class RedGoalSideAuto : BaseOpMode() {
124127
when (collectState) {
125128
CollectState.GOAL -> collectState = CollectState.MID
126129
CollectState.MID -> collectState = CollectState.AUDIENCE
127-
// TODO: Move so that audience artifacts are shot
128-
CollectState.AUDIENCE -> state = State.STOP
130+
CollectState.AUDIENCE -> collectState = CollectState.DONE
131+
CollectState.DONE -> {}
129132
}
130133
}
131134
}

0 commit comments

Comments
 (0)