| 1 | package org.usfirst.frc.team3501.robot.commands.shooter; |
| 2 | |
| 3 | import org.usfirst.frc.team3501.robot.Robot; |
| 4 | |
| 5 | import edu.wpi.first.wpilibj.command.CommandGroup; |
| 6 | import edu.wpi.first.wpilibj.command.WaitCommand; |
| 7 | |
| 8 | public class Shoot extends CommandGroup { |
| 9 | |
| 10 | public boolean usePhotogate; |
| 11 | |
| 12 | public Shoot() { |
| 13 | addSequential(new WaitCommand(3.0)); |
| 14 | addSequential(new runShooter()); |
| 15 | addSequential(new WaitCommand(3.0)); |
| 16 | if (Robot.shooter.usePhotogate()) { |
| 17 | if (Robot.shooter.isBallInside()) { |
| 18 | addSequential(new ExtendPunch()); |
| 19 | addSequential(new WaitCommand(5.0)); |
| 20 | addSequential(new RetractPunch()); |
| 21 | } |
| 22 | } else { |
| 23 | addSequential(new ExtendPunch()); |
| 24 | addSequential(new WaitCommand(5.0)); |
| 25 | addSequential(new RetractPunch()); |
| 26 | } |
| 27 | |
| 28 | } |
| 29 | } |