add precondition and Timeout to Expel and Intake commands
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / DefaultAutonStrategy.java
CommitLineData
78d476cc
ME
1package org.usfirst.frc.team3501.robot.commands;
2
dd794a4e
ME
3import org.usfirst.frc.team3501.robot.Constants.Defense;
4
78d476cc
ME
5import 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 10 */
e4f7b3a7 11
d607dcbb 12public class DefaultAutonStrategy extends CommandGroup {
ab237853 13
dd794a4e 14 public DefaultAutonStrategy(int position, Defense defense) {
78d476cc 15
53d61b3e 16 switch (defense) {
ab237853 17
dd794a4e 18 case PORTCULLIS:
ab237853 19
3c259ed2 20 addSequential(new LiftPortcullis());
ab237853 21
dd794a4e 22 case SALLY_PORT:
ab237853 23
86e1c4cc 24 addSequential(new PassSallyPort());
ab237853 25
dd794a4e 26 case ROUGH_TERRAIN:
3c259ed2 27
d607dcbb 28 addSequential(new PassRoughTerrain());
3c259ed2 29
dd794a4e 30 case LOW_BAR:
3c259ed2 31
d607dcbb 32 addSequential(new PassLowBar());
3c259ed2 33
dd794a4e 34 case CHEVAL_DE_FRISE:
3c259ed2 35
af236b4e 36 addSequential(new PassChevalDeFrise());
3c259ed2 37
dd794a4e 38 case DRAWBRIDGE:
3c259ed2 39
227fd1b1 40 addSequential(new PassDrawBridge());
3c259ed2 41
dd794a4e 42 case MOAT:
3c259ed2 43
d607dcbb 44 addSequential(new PassMoat());
3c259ed2 45
dd794a4e 46 case ROCK_WALL:
3c259ed2 47
d607dcbb 48 addSequential(new PassRockWall());
3c259ed2 49
dd794a4e 50 case RAMPART:
3c259ed2 51
d607dcbb 52 addSequential(new PassRampart());
3c259ed2 53
dd794a4e
ME
54 default:
55 break;
78d476cc 56 }
53d61b3e 57
2c0fdbba 58 addSequential(new AimAndAlign());
a697f2ff 59 addSequential(new Shoot());
ab237853 60
53d61b3e
ME
61 }
62
78d476cc 63}