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=97070637f1bc5901fa8e2510a858b17354d72ac7;hpb=e4f7b3a761a8efd786f9a471c8b669eb687a5054;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 97070637..99fe317d 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java +++ b/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java @@ -8,13 +8,8 @@ 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 { - // in feet - // distance along a platform - final double DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD = 4.0; - // number from -1 to 1 - final double SPEED_FOR_PASSING_DEFENSE = 0.5; +public class DefaultAutonStrategy extends CommandGroup { public DefaultAutonStrategy(int position, Defense defense) { @@ -30,46 +25,37 @@ public class DefaultAutonStrategy extends CommandGroup { case ROUGH_TERRAIN: - addSequential( - new DriveForDistance(DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2, - DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2)); + addSequential(new PassRoughTerrain()); case LOW_BAR: - addSequential( - new DriveForDistance(DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD + 2, - SPEED_FOR_PASSING_DEFENSE)); + addSequential(new PassLowBar()); case CHEVAL_DE_FRISE: - addSequential(new LowerChevalDeFrise()); + addSequential(new PassChevalDeFrise()); case DRAWBRIDGE: - addSequential(new LowerDrawBridge()); + addSequential(new PassDrawBridge()); case MOAT: - addSequential(new DriveForDistance( - DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE)); + addSequential(new PassMoat()); case ROCK_WALL: - addSequential(new DriveForDistance( - DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE)); + addSequential(new PassRockWall()); case RAMPART: - addSequential(new DriveForDistance( - DIST_BETWEEN_OUTER_WORKS__AND_COURTYARD, SPEED_FOR_PASSING_DEFENSE)); + addSequential(new PassRampart()); default: break; } - // TODO: put in the argument that goes inside of aim, based on the position - // variable that was passed into the command group - addSequential(new Aim()); + addSequential(new AimAndAlign()); addSequential(new Shoot()); }