refactor RunIntake to be RunIntakeContinous (because its used only with joysticks
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / shooter / ShootAtHighGoal.java
1 package org.usfirst.frc.team3501.robot.commands.shooter;
2
3 import org.usfirst.frc.team3501.robot.Constants.IntakeArm;
4 import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArm;
5
6 import edu.wpi.first.wpilibj.command.CommandGroup;
7 import edu.wpi.first.wpilibj.command.WaitCommand;
8
9 /**
10 * This command group performs the sequence of steps to shoot at the high goal
11 *
12 * pre-conditions: a ball is in the intake
13 *
14 * post-conditions: catapult is retracted, intake is extended
15 */
16 public class ShootAtHighGoal extends CommandGroup {
17 private static final double WAIT_SECONDS = 1.0;
18
19 public ShootAtHighGoal() {
20
21 // make sure intake is in up position
22 addSequential(new MoveIntakeArm(IntakeArm.RETRACT));
23
24 addSequential(new WaitCommand(WAIT_SECONDS));
25
26 // get ball onto catapult
27
28 // shoot catapult pistons
29 addSequential(new FireCatapult());
30
31 addSequential(new WaitCommand(WAIT_SECONDS));
32
33 // extend intake (ball actually shoots here)
34 addSequential(new MoveIntakeArm(IntakeArm.EXTEND));
35
36 addSequential(new WaitCommand(WAIT_SECONDS));
37
38 // wait a bit
39 addSequential(new WaitCommand(WAIT_SECONDS));
40
41 // retract catapult pistons
42 addSequential(new ResetCatapult());
43
44 //
45 }
46 }