1 package org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.Timer
;
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
{
18 private double motorVal
;
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());
33 this.motorVal
= motorVal
;
37 protected void initialize() {
43 protected void execute() {
44 Robot
.getShooter().setIndexWheelMotorVal(-motorVal
);
49 protected boolean isFinished() {
50 return timer
.get() >= time
;
54 protected void end() {
55 Robot
.getShooter().stopIndexWheel();
60 protected void interrupted() {