X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fshooter%2FShootAtHighGoal.java;h=54e4d94fc43faa600b93655f86b15b822cdb303f;hb=fee6b62e5434872f8f10c74874179a45e697205e;hp=5ecc8091a64de82af8b18863ca9cdc729840c25c;hpb=e062fd0698aa9583dd007f3a3759dd2adc9d2010;p=3501%2Fstronghold-2016 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 5ecc8091..54e4d94f 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java @@ -1,29 +1,35 @@ 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; /** * This command group performs the sequence of steps to shoot at the high goal * - * pre-conditions: the catapult is down, a ball is in the intake, and the intake - * is in the up position + * pre-conditions: a ball is in the intake, and the intake is in the up position * * post-conditions: catapult is retracted, intake is extended */ public class ShootAtHighGoal extends CommandGroup { public ShootAtHighGoal() { - // check that the catapult is down and change accordingly - // (if photogate) check if ball is in intake // make sure intake is in up position and change accordingly + if (!Robot.intakeArm.isExtended()) + addSequential(new MoveIntakeArm(IntakeArm.RETRACT)); // shoot catapult pistons + addSequential(new FireCatapult()); // extend intake (ball actually shoots here) + addSequential(new MoveIntakeArm(IntakeArm.EXTEND)); // retract catapult pistons + addSequential(new ResetCatapult()); } }