Commit | Line | Data |
---|---|---|
e062fd06 ME |
1 | package org.usfirst.frc.team3501.robot.commands.shooter; |
2 | ||
fee6b62e | 3 | import org.usfirst.frc.team3501.robot.Constants.IntakeArm; |
b1678339 | 4 | import org.usfirst.frc.team3501.robot.Constants.Shooter; |
fee6b62e | 5 | import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArm; |
b1678339 | 6 | import org.usfirst.frc.team3501.robot.commands.intakearm.TimeRunIntake; |
fee6b62e | 7 | |
e062fd06 | 8 | import edu.wpi.first.wpilibj.command.CommandGroup; |
0496ee10 | 9 | import edu.wpi.first.wpilibj.command.WaitCommand; |
e062fd06 ME |
10 | |
11 | /** | |
12 | * This command group performs the sequence of steps to shoot at the high goal | |
13 | * | |
0496ee10 | 14 | * pre-conditions: a ball is in the intake |
e062fd06 ME |
15 | * |
16 | * post-conditions: catapult is retracted, intake is extended | |
17 | */ | |
18 | public class ShootAtHighGoal extends CommandGroup { | |
b1678339 | 19 | // TODO: test for this |
0b12952a | 20 | private static final double WAIT_SECONDS = 1.0; |
e062fd06 ME |
21 | |
22 | public ShootAtHighGoal() { | |
e062fd06 | 23 | |
0496ee10 ME |
24 | // make sure intake is in up position |
25 | addSequential(new MoveIntakeArm(IntakeArm.RETRACT)); | |
e062fd06 | 26 | |
0b12952a ME |
27 | addSequential(new WaitCommand(WAIT_SECONDS)); |
28 | ||
29 | // get ball onto catapult | |
b1678339 ME |
30 | addSequential(new TimeRunIntake(Shooter.TIME_FOR_BALL_TO_CATAPULT_ROLLING)); |
31 | ||
32 | addSequential(new WaitCommand(WAIT_SECONDS)); | |
0b12952a | 33 | |
e062fd06 | 34 | // shoot catapult pistons |
fee6b62e | 35 | addSequential(new FireCatapult()); |
e062fd06 | 36 | |
0b12952a ME |
37 | addSequential(new WaitCommand(WAIT_SECONDS)); |
38 | ||
e062fd06 | 39 | // extend intake (ball actually shoots here) |
fee6b62e | 40 | addSequential(new MoveIntakeArm(IntakeArm.EXTEND)); |
e062fd06 | 41 | |
0b12952a ME |
42 | addSequential(new WaitCommand(WAIT_SECONDS)); |
43 | ||
e062fd06 | 44 | // retract catapult pistons |
fee6b62e | 45 | addSequential(new ResetCatapult()); |
e062fd06 | 46 | |
0b12952a | 47 | // |
e062fd06 ME |
48 | } |
49 | } |