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; |
fee6b62e ME |
4 | import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArm; |
5 | ||
e062fd06 | 6 | import edu.wpi.first.wpilibj.command.CommandGroup; |
0496ee10 | 7 | import 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 | */ | |
16 | public class ShootAtHighGoal extends CommandGroup { | |
17 | ||
18 | public ShootAtHighGoal() { | |
0496ee10 ME |
19 | // make sure catapult is down |
20 | addSequential(new ResetCatapult()); | |
e062fd06 | 21 | |
0496ee10 ME |
22 | // make sure intake is in up position |
23 | addSequential(new MoveIntakeArm(IntakeArm.RETRACT)); | |
e062fd06 ME |
24 | |
25 | // shoot catapult pistons | |
fee6b62e | 26 | addSequential(new FireCatapult()); |
e062fd06 ME |
27 | |
28 | // extend intake (ball actually shoots here) | |
fee6b62e | 29 | addSequential(new MoveIntakeArm(IntakeArm.EXTEND)); |
e062fd06 | 30 | |
0496ee10 ME |
31 | // wait a bit |
32 | addSequential(new WaitCommand(1.0)); | |
33 | ||
e062fd06 | 34 | // retract catapult pistons |
fee6b62e | 35 | addSequential(new ResetCatapult()); |
e062fd06 ME |
36 | |
37 | } | |
38 | } |