Commit | Line | Data |
---|---|---|
e062fd06 ME |
1 | package org.usfirst.frc.team3501.robot.commands.shooter; |
2 | ||
fee6b62e ME |
3 | import org.usfirst.frc.team3501.robot.Constants.IntakeArm; |
4 | import org.usfirst.frc.team3501.robot.Robot; | |
5 | import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArm; | |
6 | ||
e062fd06 ME |
7 | import edu.wpi.first.wpilibj.command.CommandGroup; |
8 | ||
9 | /** | |
10 | * This command group performs the sequence of steps to shoot at the high goal | |
11 | * | |
fee6b62e | 12 | * pre-conditions: a ball is in the intake, and the intake is in the up position |
e062fd06 ME |
13 | * |
14 | * post-conditions: catapult is retracted, intake is extended | |
15 | */ | |
16 | public class ShootAtHighGoal extends CommandGroup { | |
17 | ||
18 | public ShootAtHighGoal() { | |
e062fd06 ME |
19 | // (if photogate) check if ball is in intake |
20 | ||
21 | // make sure intake is in up position and change accordingly | |
fee6b62e ME |
22 | if (!Robot.intakeArm.isExtended()) |
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 ME |
30 | |
31 | // retract catapult pistons | |
fee6b62e | 32 | addSequential(new ResetCatapult()); |
e062fd06 ME |
33 | |
34 | } | |
35 | } |