From 3c259ed2ad4ca14e589b65807041d832e1e0a8eb Mon Sep 17 00:00:00 2001 From: Meryem Esa Date: Thu, 28 Jan 2016 20:46:14 -0800 Subject: [PATCH] fill in the cases in the defense switch - many variables are not defined and need to be tested --- .../robot/commands/DefaultAutonStrategy.java | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) 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; - } } -- 2.30.2