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;
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());
+ }
+
}
}