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