From: Meryem Esa Date: Fri, 29 Jan 2016 04:46:14 +0000 (-0800) Subject: fill in the cases in the defense switch - many variables are not defined and need... X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=3c259ed2ad4ca14e589b65807041d832e1e0a8eb fill in the cases in the defense switch - many variables are not defined and need to be tested --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java b/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java index f2b07780..df21714a 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java +++ b/src/org/usfirst/frc/team3501/robot/commands/DefaultAutonStrategy.java @@ -16,20 +16,46 @@ public class DefaultAutonStrategy extends CommandGroup { * drive forward aim face tower aim shooter toward goal shoot */ - // based on defense pass the defense + // TODO: any variable that is not declared/instantiated are vars that need + // to be tested for their value + switch (defense) { case PORTCULLIS: + // we are assuming that the robot is also driving forward as the + // portcullis is being lifted + addSequential(new LiftPortcullis()); case SALLY_PORT: + // addSequential(); case ROUGH_TERRAIN: + + addSequential(new DriveForDistance(distance, speed)); + case LOW_BAR: + + addSequential(new DriveForDistance(distance, speed)); + case CHEVAL_DE_FRISE: + + addSequential(new LowerChevalDeFrise()); + case DRAWBRIDGE: + + addSequential(new LowerDrawBridge()); + case MOAT: + + addSequential(new DriveForDistance(distance, speed)); + case ROCK_WALL: + + addSequential(new DriveForDistance(distance, speed)); + case RAMPART: + + addSequential(new DriveForDistance(distance, speed)); + default: break; - } }