X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fauton%2FDefaultAutonStrategy.java;h=6ccef7c587e889d1d32ac32d778a9661b7afbc94;hb=835181361929a91784dcafb3665af99e64bd40cd;hp=4146977d98f48ae3cc3953b1316595c608447947;hpb=6bb7f8ac8eca89a8e0b308720f7e15178eef43ea;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/commands/auton/DefaultAutonStrategy.java b/src/org/usfirst/frc/team3501/robot/commands/auton/DefaultAutonStrategy.java index 4146977d..6ccef7c5 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/auton/DefaultAutonStrategy.java +++ b/src/org/usfirst/frc/team3501/robot/commands/auton/DefaultAutonStrategy.java @@ -1,9 +1,11 @@ package org.usfirst.frc.team3501.robot.commands.auton; +import org.usfirst.frc.team3501.robot.Constants; import org.usfirst.frc.team3501.robot.Constants.Defense; import org.usfirst.frc.team3501.robot.commands.shooter.Shoot; import edu.wpi.first.wpilibj.command.CommandGroup; +import edu.wpi.first.wpilibj.command.WaitCommand; /** * The default autonomous strategy involves passing the defense that is in front @@ -14,49 +16,36 @@ public class DefaultAutonStrategy extends CommandGroup { public DefaultAutonStrategy(int position, Defense defense) { - switch (defense) { - - case PORTCULLIS: - + if (defense == Constants.Defense.PORTCULLIS) addSequential(new LiftPortcullis()); - case SALLY_PORT: - + else if (defense == Constants.Defense.SALLY_PORT) addSequential(new PassSallyPort()); - case ROUGH_TERRAIN: - + else if (defense == Constants.Defense.ROUGH_TERRAIN) addSequential(new PassRoughTerrain()); - case LOW_BAR: - + else if (defense == Constants.Defense.LOW_BAR) addSequential(new PassLowBar()); - case CHEVAL_DE_FRISE: - + else if (defense == Constants.Defense.CHEVAL_DE_FRISE) addSequential(new PassChevalDeFrise()); - case DRAWBRIDGE: - + else if (defense == Constants.Defense.DRAWBRIDGE) addSequential(new PassDrawBridge()); - case MOAT: - + else if (defense == Constants.Defense.MOAT) addSequential(new PassMoat()); - case ROCK_WALL: - + else if (defense == Constants.Defense.ROCK_WALL) addSequential(new PassRockWall()); - case RAMPART: - + else if (defense == Constants.Defense.RAMPART) addSequential(new PassRampart()); - default: - break; - } - - addSequential(new AimAndAlign()); + addSequential(new AlignToScore(position)); + // TODO: test for how long robot should wait + addSequential(new WaitCommand(5.0)); addSequential(new Shoot()); }