From: Meryem Esa Date: Thu, 11 Feb 2016 02:38:34 +0000 (-0800) Subject: set up AlignToScore command group X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=ff5c6dccf9c24d6e41b3be74a744ea56a36514f0 set up AlignToScore command group --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/AlignToScore.java b/src/org/usfirst/frc/team3501/robot/commands/AlignToScore.java new file mode 100755 index 00000000..0c27e908 --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/commands/AlignToScore.java @@ -0,0 +1,42 @@ +package org.usfirst.frc.team3501.robot.commands; + +import edu.wpi.first.wpilibj.command.CommandGroup; + +/** + * This command group will be used in autonomous. Based on what position the + * robot is in, the robot will align with the goal + * + * pre-condition: robot is flush against a defense at the specified position in + * the opponent's courtyard + * + * post-condition: the robot is parallel to one of the three goals and the + * shooter is facing that goal + * + */ +public class AlignToScore extends CommandGroup { + + public AlignToScore(int position) { + + switch (position) { + case 1: + + addSequential(); + + case 2: + + addSequential(); + + case 3: + + addSequential(); + + case 4: + + addSequential(); + + case 5: + + addSequential(); + } + } +} diff --git a/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java b/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java index 9d9184d8..50b81c45 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java +++ b/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java @@ -20,8 +20,7 @@ public class PassLowBar extends CommandGroup { private final double DEFAULT_SPEED = 0.5; public PassLowBar() { - // TODO: need to add sequential for retracting the arms and shooting hood - // once those commands are made + // TODO: need to add sequential for retracting the arms and shooting hood once those commands are made addSequential(new DriveForDistance(DISTANCE, DEFAULT_SPEED)); }