X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fshooter%2FShoot.java;h=0b80c1d9c349f7d8b0ddcde6d0bd936e2f632f26;hp=31fb261e576f0a9748769a1bfa7dd3d5f94b1aee;hb=e4fbab026f4a68a4a238839ae2295c56c1134434;hpb=faabd6f8711d4f582a4fcec6f46bdee1ddd3d1cf diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/Shoot.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/Shoot.java index 31fb261e..0b80c1d9 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/Shoot.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/Shoot.java @@ -1,5 +1,6 @@ package org.usfirst.frc.team3501.robot.commands.shooter; +import org.usfirst.frc.team3501.robot.Constants; import org.usfirst.frc.team3501.robot.Robot; import edu.wpi.first.wpilibj.command.CommandGroup; @@ -9,21 +10,24 @@ public class Shoot extends CommandGroup { public boolean usePhotogate; + /** + * Fires catapult, then resets after a pause. If robot is set to use photogate + * and no ball is detected, nothing happens. + * + * Precondition: catapult is in reset position, and ball is loaded in + * catapult. + */ public Shoot() { - addSequential(new WaitCommand(3.0)); - addSequential(new runShooter()); - addSequential(new WaitCommand(3.0)); if (Robot.shooter.usePhotogate()) { if (Robot.shooter.isBallInside()) { - addSequential(new ExtendPunch()); - addSequential(new WaitCommand(5.0)); - addSequential(new RetractPunch()); + addSequential(new FireCatapult()); + addSequential(new WaitCommand(Constants.Shooter.WAIT_TIME)); + addSequential(new ResetCatapult()); } } else { - addSequential(new ExtendPunch()); - addSequential(new WaitCommand(5.0)); - addSequential(new RetractPunch()); + addSequential(new FireCatapult()); + addSequential(new WaitCommand(Constants.Shooter.WAIT_TIME)); + addSequential(new ResetCatapult()); } - } }