Skip to content

Commit 80e45b0

Browse files
committed
pathchains
1 parent c4b3a65 commit 80e45b0

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode/auton/Close18BallAuton.kt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,11 @@ open class Close18BallAuton(var isRed: Boolean) : OpMode() {
9191
WaitFor { isStarted }
9292
flyWheel.state = FlyWheel.FlyWheelState.SHOOTING
9393
}
94-
+autonManager.runPath(0) // preload
94+
95+
// preload
96+
+autonManager.runPath(0)
9597
+fire
98+
9699
// row 2
97100
+autonManager.runPathChain(
98101
listOf(1, 2), listOf({}, {
@@ -110,10 +113,14 @@ open class Close18BallAuton(var isRed: Boolean) : OpMode() {
110113
}
111114
}
112115
+fire
113-
repeat(2) { // ramp
116+
117+
// ramp
118+
repeat(2) {
114119
+gateCycle
115120
+fire
116121
}
122+
123+
// row 3
117124
+autonManager.runPathChain(listOf(7, 8), listOf({}, {
118125
it.addTemporalCallback(row3SlowT) {
119126
drive.follower.setMaxPower(row3SlowSpeed)
@@ -128,6 +135,8 @@ open class Close18BallAuton(var isRed: Boolean) : OpMode() {
128135
}
129136
}
130137
+fire
138+
139+
// row 1
131140
+autonManager.runPath(10) {
132141
it.addTemporalCallback(row1SlowT) {
133142
drive.follower.setMaxPower(row1SlowSpeed)
@@ -142,6 +151,8 @@ open class Close18BallAuton(var isRed: Boolean) : OpMode() {
142151
}
143152
}
144153
+fire
154+
155+
// ending
145156
+endAuton
146157
})
147158
}

0 commit comments

Comments
 (0)