1 package org
.usfirst
.frc
.team3501
.robot
.commands
.auton
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
;
4 import org
.usfirst
.frc
.team3501
.robot
.Constants
.Defense
;
5 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.Shoot
;
7 import edu
.wpi
.first
.wpilibj
.command
.CommandGroup
;
8 import edu
.wpi
.first
.wpilibj
.command
.WaitCommand
;
11 * The default autonomous strategy involves passing the defense that is in front
12 * of it, aiming the robot/ shooter towards the goal, and shooting.
15 public class DefaultAutonStrategy
extends CommandGroup
{
17 public DefaultAutonStrategy(int position
, Defense defense
) {
19 if (defense
== Constants
.Defense
.PORTCULLIS
)
20 addSequential(new LiftPortcullis());
22 else if (defense
== Constants
.Defense
.SALLY_PORT
)
23 addSequential(new PassSallyPort());
25 else if (defense
== Constants
.Defense
.ROUGH_TERRAIN
)
26 addSequential(new PassRoughTerrain());
28 else if (defense
== Constants
.Defense
.LOW_BAR
)
29 addSequential(new PassLowBar());
31 else if (defense
== Constants
.Defense
.CHEVAL_DE_FRISE
)
32 addSequential(new PassChevalDeFrise());
34 else if (defense
== Constants
.Defense
.DRAWBRIDGE
)
35 addSequential(new PassDrawBridge());
37 else if (defense
== Constants
.Defense
.MOAT
)
38 addSequential(new PassMoat());
40 else if (defense
== Constants
.Defense
.ROCK_WALL
)
41 addSequential(new PassRockWall());
43 else if (defense
== Constants
.Defense
.RAMPART
)
44 addSequential(new PassRampart());
46 addSequential(new AlignToScore(position
));
47 addSequential(new WaitCommand(5.0));
48 addSequential(new Shoot());