add constants same format as meryem did to constants and also add time dead reckoning
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / shooter / Shoot.java
index e136c739ae78e74b1da7503258ffa29828fae850..31fb261e576f0a9748769a1bfa7dd3d5f94b1aee 100755 (executable)
@@ -1,17 +1,29 @@
 package org.usfirst.frc.team3501.robot.commands.shooter;
 
-import org.usfirst.frc.team3501.robot.commands.auton.AimAndAlign;
+import org.usfirst.frc.team3501.robot.Robot;
 
 import edu.wpi.first.wpilibj.command.CommandGroup;
 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());
+    }
+
   }
 }