From: Meryem Esa Date: Wed, 16 Mar 2016 01:39:16 +0000 (-0700) Subject: add wait command and remove if statement checking for catapult extension X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=0496ee10adca9fb0bbeafba909c98c6d75823078 add wait command and remove if statement checking for catapult extension --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java index 54e4d94f..70817273 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java @@ -1,26 +1,26 @@ package org.usfirst.frc.team3501.robot.commands.shooter; import org.usfirst.frc.team3501.robot.Constants.IntakeArm; -import org.usfirst.frc.team3501.robot.Robot; import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArm; import edu.wpi.first.wpilibj.command.CommandGroup; +import edu.wpi.first.wpilibj.command.WaitCommand; /** * This command group performs the sequence of steps to shoot at the high goal * - * pre-conditions: a ball is in the intake, and the intake is in the up position + * pre-conditions: a ball is in the intake * * post-conditions: catapult is retracted, intake is extended */ public class ShootAtHighGoal extends CommandGroup { public ShootAtHighGoal() { - // (if photogate) check if ball is in intake + // make sure catapult is down + addSequential(new ResetCatapult()); - // make sure intake is in up position and change accordingly - if (!Robot.intakeArm.isExtended()) - addSequential(new MoveIntakeArm(IntakeArm.RETRACT)); + // make sure intake is in up position + addSequential(new MoveIntakeArm(IntakeArm.RETRACT)); // shoot catapult pistons addSequential(new FireCatapult()); @@ -28,6 +28,9 @@ public class ShootAtHighGoal extends CommandGroup { // extend intake (ball actually shoots here) addSequential(new MoveIntakeArm(IntakeArm.EXTEND)); + // wait a bit + addSequential(new WaitCommand(1.0)); + // retract catapult pistons addSequential(new ResetCatapult());