Add rudimentary auton strategies based on timing
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / auton / ChooseStrategy.java
1 package org.usfirst.frc.team3501.robot.commands.auton;
2
3 import org.usfirst.frc.team3501.robot.Constants.Auton;
4 import org.usfirst.frc.team3501.robot.Constants.Defense;
5 import org.usfirst.frc.team3501.robot.commands.shooter.Shoot;
6
7 import edu.wpi.first.wpilibj.command.CommandGroup;
8 import edu.wpi.first.wpilibj.command.WaitCommand;
9
10 public class ChooseStrategy extends CommandGroup {
11
12 public ChooseStrategy(int position, Defense defense) {
13
14 if (defense == Defense.PORTCULLIS)
15 addSequential(new PassPortcullis());
16
17 else if (defense == Defense.CHIVAL_DE_FRISE)
18 addSequential(new PassChivalDeFrise());
19
20 else if (defense == Defense.MOAT)
21 addSequential(new PassMoat());
22
23 else if (defense == Defense.ROCK_WALL)
24 addSequential(new PassRockWall());
25
26 else if (defense == Defense.DRAWBRIDGE)
27 addSequential(new PassDrawbridge());
28
29 else if (defense == Defense.SALLY_PORT)
30 addSequential(new PassSallyPort());
31
32 else if (defense == Defense.RAMPART)
33 addSequential(new PassRampart());
34
35 else if (defense == Defense.ROUGH_TERRAIN)
36 addSequential(new PassRoughTerrain());
37
38 else if (defense == Defense.LOW_BAR)
39 addSequential(new PassLowBar());
40
41 addSequential(new AlignToScore(position));
42 // TODO: test for how long robot should wait
43 addSequential(new WaitCommand(Auton.WAIT_TIME));
44 addSequential(new Shoot());
45
46 }
47 }