X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2FDefaultAutonStrategy.java;h=99fe317d3945d2ab85ebf689d2f561d458a8c940;hb=a1989c116a0926b44d6f36067e84b7f5fb2d313f;hp=5eaab4571871a620b165d3d894723a2079a4fe3c;hpb=53d61b3e2d15d705cf14483a04aec80cdfb184e3;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java b/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java index 5eaab457..99fe317d 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java +++ b/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java @@ -1,28 +1,63 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.robot.Constants.Defense; + import edu.wpi.first.wpilibj.command.CommandGroup; /** * The default autonomous strategy involves passing the defense that is in front * of it, aiming the robot/ shooter towards the goal, and shooting. */ + public class DefaultAutonStrategy extends CommandGroup { - public DefaultAutonStrategy(int position, int defense) { - /* - * pass defense drive forward do what has to be done to pass the defense - * drive forward aim face tower aim shooter toward goal shoot - */ + public DefaultAutonStrategy(int position, Defense defense) { - // based on defense pass the defense switch (defense) { - case 1: - case 2: - case 3: - case 4: - case 5: + + case PORTCULLIS: + + addSequential(new LiftPortcullis()); + + case SALLY_PORT: + + addSequential(new PassSallyPort()); + + case ROUGH_TERRAIN: + + addSequential(new PassRoughTerrain()); + + case LOW_BAR: + + addSequential(new PassLowBar()); + + case CHEVAL_DE_FRISE: + + addSequential(new PassChevalDeFrise()); + + case DRAWBRIDGE: + + addSequential(new PassDrawBridge()); + + case MOAT: + + addSequential(new PassMoat()); + + case ROCK_WALL: + + addSequential(new PassRockWall()); + + case RAMPART: + + addSequential(new PassRampart()); + + default: + break; } + addSequential(new AimAndAlign()); + addSequential(new Shoot()); + } }