1 package org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
4 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.Shooter
;
6 import edu
.wpi
.first
.wpilibj
.command
.Command
;
9 * This command reverses the index wheel at a given speed for given time in
12 * @author shivanighanta
15 public class ReverseIndexWheel
extends Command
{
17 private double motorVal
;
18 private Shooter shooter
= Robot
.getShooter();
21 * See JavaDoc comment in class for details
24 * value range from -1 to 1
26 * in seconds, amount of time to run index wheel motor
29 public ReverseIndexWheel(double time
, double motorVal
) {
30 requires(Robot
.getDriveTrain());
32 this.motorVal
= motorVal
;
36 protected void initialize() {
41 protected void execute() {
42 shooter
.runIndexWheelReverse();
47 protected boolean isFinished() {
48 return timeSinceInitialized() >= time
;
52 protected void end() {
53 Robot
.getShooter().stopIndexWheel();
58 protected void interrupted() {