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