Commit | Line | Data |
---|---|---|
78d476cc ME |
1 | package org.usfirst.frc.team3501.robot.commands; |
2 | ||
dd794a4e ME |
3 | import org.usfirst.frc.team3501.robot.Constants.Defense; |
4 | ||
78d476cc ME |
5 | import edu.wpi.first.wpilibj.command.CommandGroup; |
6 | ||
7 | /** | |
53d61b3e ME |
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. | |
78d476cc ME |
10 | */ |
11 | public class DefaultAutonStrategy extends CommandGroup { | |
78d476cc | 12 | |
dd794a4e | 13 | public DefaultAutonStrategy(int position, Defense defense) { |
53d61b3e ME |
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 | */ | |
78d476cc | 18 | |
3c259ed2 ME |
19 | // TODO: any variable that is not declared/instantiated are vars that need |
20 | // to be tested for their value | |
21 | ||
53d61b3e | 22 | switch (defense) { |
dd794a4e | 23 | case PORTCULLIS: |
3c259ed2 ME |
24 | // we are assuming that the robot is also driving forward as the |
25 | // portcullis is being lifted | |
26 | addSequential(new LiftPortcullis()); | |
dd794a4e | 27 | case SALLY_PORT: |
3c259ed2 | 28 | // addSequential(); |
dd794a4e | 29 | case ROUGH_TERRAIN: |
3c259ed2 ME |
30 | |
31 | addSequential(new DriveForDistance(distance, speed)); | |
32 | ||
dd794a4e | 33 | case LOW_BAR: |
3c259ed2 ME |
34 | |
35 | addSequential(new DriveForDistance(distance, speed)); | |
36 | ||
dd794a4e | 37 | case CHEVAL_DE_FRISE: |
3c259ed2 ME |
38 | |
39 | addSequential(new LowerChevalDeFrise()); | |
40 | ||
dd794a4e | 41 | case DRAWBRIDGE: |
3c259ed2 ME |
42 | |
43 | addSequential(new LowerDrawBridge()); | |
44 | ||
dd794a4e | 45 | case MOAT: |
3c259ed2 ME |
46 | |
47 | addSequential(new DriveForDistance(distance, speed)); | |
48 | ||
dd794a4e | 49 | case ROCK_WALL: |
3c259ed2 ME |
50 | |
51 | addSequential(new DriveForDistance(distance, speed)); | |
52 | ||
dd794a4e | 53 | case RAMPART: |
3c259ed2 ME |
54 | |
55 | addSequential(new DriveForDistance(distance, speed)); | |
56 | ||
dd794a4e ME |
57 | default: |
58 | break; | |
78d476cc | 59 | } |
53d61b3e ME |
60 | |
61 | } | |
62 | ||
78d476cc | 63 | } |