1 package org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
.IntakeArm
;
4 import org
.usfirst
.frc
.team3501
.robot
.Constants
.Shooter
;
5 import org
.usfirst
.frc
.team3501
.robot
.commands
.intakearm
.MoveIntakeArm
;
6 import org
.usfirst
.frc
.team3501
.robot
.commands
.intakearm
.TimeRunIntake
;
8 import edu
.wpi
.first
.wpilibj
.command
.CommandGroup
;
9 import edu
.wpi
.first
.wpilibj
.command
.WaitCommand
;
12 * This command group performs the sequence of steps to shoot at the high goal
14 * pre-conditions: a ball is in the intake
16 * post-conditions: catapult is retracted, intake is extended
18 public class ShootAtHighGoal
extends CommandGroup
{
19 // TODO: test for this
20 private static final double WAIT_SECONDS
= 1.0;
22 public ShootAtHighGoal() {
24 // make sure intake is in up position
25 addSequential(new MoveIntakeArm(IntakeArm
.RETRACT
));
27 addSequential(new WaitCommand(WAIT_SECONDS
));
29 // get ball onto catapult
30 addSequential(new TimeRunIntake(Shooter
.TIME_FOR_BALL_TO_CATAPULT_ROLLING
));
32 addSequential(new WaitCommand(WAIT_SECONDS
));
34 // shoot catapult pistons
35 addSequential(new FireCatapult());
37 addSequential(new WaitCommand(WAIT_SECONDS
));
39 // extend intake (ball actually shoots here)
40 addSequential(new MoveIntakeArm(IntakeArm
.EXTEND
));
42 addSequential(new WaitCommand(WAIT_SECONDS
));
44 // retract catapult pistons
45 addSequential(new ResetCatapult());