X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fshooter%2FShoot.java;h=90105e0c9368663df2ba0a69d131e5c36481cc03;hb=2485099662fecd9ccb9f6ac455b2f37fefc0ed97;hp=e136c739ae78e74b1da7503258ffa29828fae850;hpb=071ab31546b9c3cf13bca472a4ac76b1480aeb6a;p=3501%2Fstronghold-2016 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 e136c739..90105e0c 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,5 @@ package org.usfirst.frc.team3501.robot.commands.shooter; - +import org.usfirst.frc.team3501.robot.Robot; import org.usfirst.frc.team3501.robot.commands.auton.AimAndAlign; import edu.wpi.first.wpilibj.command.CommandGroup; @@ -7,11 +7,24 @@ import edu.wpi.first.wpilibj.command.WaitCommand; public class Shoot extends CommandGroup { + public boolean usePhotogate; + public Shoot() { addSequential(new AimAndAlign()); addSequential(new WaitCommand(3.0)); addSequential(new runShooter()); addSequential(new WaitCommand(3.0)); - addSequential(new Punch()); + if (Robot.shooter.usePhotogate()) { + if (Robot.shooter.isBallInside()) { + addSequential(new ExtendPunch()); + addSequential(new WaitCommand(5.0)); + addSequential(new RetractPunch()); + } + } else { + addSequential(new ExtendPunch()); + addSequential(new WaitCommand(5.0)); + addSequential(new RetractPunch()); + } + } }