| 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 | |
| 18 | public ShootAtHighGoal() { |
| 19 | // make sure catapult is down |
| 20 | addSequential(new ResetCatapult()); |
| 21 | |
| 22 | // make sure intake is in up position |
| 23 | addSequential(new MoveIntakeArm(IntakeArm.RETRACT)); |
| 24 | |
| 25 | // shoot catapult pistons |
| 26 | addSequential(new FireCatapult()); |
| 27 | |
| 28 | // extend intake (ball actually shoots here) |
| 29 | addSequential(new MoveIntakeArm(IntakeArm.EXTEND)); |
| 30 | |
| 31 | // wait a bit |
| 32 | addSequential(new WaitCommand(1.0)); |
| 33 | |
| 34 | // retract catapult pistons |
| 35 | addSequential(new ResetCatapult()); |
| 36 | |
| 37 | } |
| 38 | } |