fill in the cases in the defense switch - many variables are not defined and need...
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / DefaultAutonStrategy.java
1 package org.usfirst.frc.team3501.robot.commands;
2
3 import org.usfirst.frc.team3501.robot.Constants.Defense;
4
5 import edu.wpi.first.wpilibj.command.CommandGroup;
6
7 /**
8 * The default autonomous strategy involves passing the defense that is in front
9 * of it, aiming the robot/ shooter towards the goal, and shooting.
10 */
11 public class DefaultAutonStrategy extends CommandGroup {
12
13 public DefaultAutonStrategy(int position, Defense defense) {
14 /*
15 * pass defense drive forward do what has to be done to pass the defense
16 * drive forward aim face tower aim shooter toward goal shoot
17 */
18
19 // TODO: any variable that is not declared/instantiated are vars that need
20 // to be tested for their value
21
22 switch (defense) {
23 case PORTCULLIS:
24 // we are assuming that the robot is also driving forward as the
25 // portcullis is being lifted
26 addSequential(new LiftPortcullis());
27 case SALLY_PORT:
28 // addSequential();
29 case ROUGH_TERRAIN:
30
31 addSequential(new DriveForDistance(distance, speed));
32
33 case LOW_BAR:
34
35 addSequential(new DriveForDistance(distance, speed));
36
37 case CHEVAL_DE_FRISE:
38
39 addSequential(new LowerChevalDeFrise());
40
41 case DRAWBRIDGE:
42
43 addSequential(new LowerDrawBridge());
44
45 case MOAT:
46
47 addSequential(new DriveForDistance(distance, speed));
48
49 case ROCK_WALL:
50
51 addSequential(new DriveForDistance(distance, speed));
52
53 case RAMPART:
54
55 addSequential(new DriveForDistance(distance, speed));
56
57 default:
58 break;
59 }
60
61 }
62
63 }