File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/main/kotlin/frc/robot Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -276,13 +276,18 @@ class RobotContainer {
276
276
lights.defaultCommand = setAlliance
277
277
278
278
/* toggle vision mode with D-Pad (pov) and toggle
279
- auto intake with start and back on controller0 */
279
+ auto intake with start and back on controller0.
280
+ controller1 can also change vision mode */
280
281
visionToggle.defaultCommand = VisionModeChange (visionToggle) {
281
282
val visionMode = {
282
- when (controller0 .pov) {
283
+ when (controller1 .pov) {
283
284
90 -> VisionModes .HIGHGOAL // right
284
285
270 -> VisionModes .BALL // left
285
- else -> visionToggle.visionMode
286
+ else -> when (controller0.pov) {
287
+ 90 -> VisionModes .HIGHGOAL // right
288
+ 270 -> VisionModes .BALL // left
289
+ else -> visionToggle.visionMode
290
+ }
286
291
}
287
292
}
288
293
You can’t perform that action at this time.
0 commit comments