1 package org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
;
4 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
6 import edu
.wpi
.first
.wpilibj
.command
.CommandGroup
;
7 import edu
.wpi
.first
.wpilibj
.command
.WaitCommand
;
9 public class Shoot
extends CommandGroup
{
11 public boolean usePhotogate
;
14 * Fires catapult, then resets after a pause. If robot is set to use photogate
15 * and no ball is detected, nothing happens.
17 * Precondition: catapult is in reset position, and ball is loaded in
21 if (Robot
.shooter
.usePhotogate()) {
22 if (Robot
.shooter
.isBallInside()) {
23 addSequential(new FireCatapult());
24 addSequential(new WaitCommand(Constants
.Shooter
.WAIT_TIME
));
25 addSequential(new ResetCatapult());
28 addSequential(new FireCatapult());
29 addSequential(new WaitCommand(Constants
.Shooter
.WAIT_TIME
));
30 addSequential(new ResetCatapult());